JaedenRuiner
Well-known member
- Joined
- Aug 13, 2007
- Messages
- 340
- Programming Experience
- 10+
Given the extreme object orientation of .Net I am wondering if it is possible to add a functionality to an Enum Type. I have the simple Enum type:
But, given the declarative nature of enum types I can't do:
The compiler disagrees with this, so I'm wondering if I can inherit from the Enum class and write my own functionality to it from which I can expand the behavior of the enum type.
thanks
Jaeden "Sifo Dyas" al'Raec Ruiner
VB.NET:
public enum MyEnum
value1
value2
value3
end enum
But, given the declarative nature of enum types I can't do:
VB.NET:
public enum myenum
public shared function DoSomething() as string
end function
end enum
The compiler disagrees with this, so I'm wondering if I can inherit from the Enum class and write my own functionality to it from which I can expand the behavior of the enum type.
thanks
Jaeden "Sifo Dyas" al'Raec Ruiner