Hello,
I have a class property of type enum. The enum name is TemplateType:
Private _Type As TemplateType
< _
Bindable(True), _
DefaultValue(""), _
> _
Public Property Type() As TemplateType
Get
Return _Type
End Get
Set(ByVal value As TemplateType)
_Type = value
End Set
End Property
I need to run some code if a Type was defined. If Type wasn't defined
then I will not run this code.
How can I do this?
Should I add a Enum item named None and make it the default value?
Thanks,
Miguel
Teemu Keiski - 17 Mar 2008 21:43 GMT
Enum is basically a value type and it does not have null directly (unless
you play with nullable types). Making an enum with None value is clear and
straighforward approach.

Signature
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net
> Hello,
>
[quoted text clipped - 24 lines]
>
> Miguel