Vb.net, option strict, enums and overriding ToString?

You can explicitly cast the SelectedValue to an int, or the Country as a string.

You can explicitly cast the SelectedValue to an int, or the Country as a string. If CInt(ddl. SelectedValue) = Country.

Canada or If ddl. SelectedValue = CStr(Country. Canada) If you take the first option, you might need to explicitly declare your enum as Integer Public Enum Country As Integer The warning occurs because SelectedValue is a string, and Country is an Integer, so an implicit conversion occurs - just like it says!

If you want the value '1' rather than 'Canada', you can explicitly cast it as an integer first, and then call .ToString() on the result of that. Ddl. SelectedValue = DirectCast(Country.

Canada, Integer).ToString().

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions