c# - Determine MessageBoxIcon Based on ComboBox -


i want combine combobox's value , messageboxicon. want (basically) this:

messagebox.show("text", "text", messageboxbuttons.ok, messageboxicon.combobox.value.tostring()); 

is possible? doesn't have done in 1 line. text either "warning" or "error".

use enum.parse method:

messagebox.show("text", "text", messageboxbuttons.ok, (messageboxicon)enum.parse(typeof(messageboxicon), combobox.text.tostring()); 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -