I have a quick query about classes, and standards.
This is probably a very easy/stupid question or I am over complicating a simple process. In any case, please advise..
If you have an instance of a class, which has an attribute (e.g Value) where the values can only be taken from a set list e.g {0,1,2,3,4,5,6,7}.
When writing code, when using this attribute one might type:
myClass.Value = 2
But if I wanted to make the line more abstract by saying
myClass.value = Tuesday
I could use an enumerated type outside of the class, where Tuesday would represent 2, Wednesday 3 etc.. to get this abstraction. However, is it better to create a class type library!?!?! e.g have something like (where myWeek is an instance of the class type)
myClass.Value = myWeek.Tuesday
I am getting confused, I am using VB6/VBA and whilst I could create a type library dll , I don't want this code to rely on external dll.
Is this how VB.NET works!?
Just trying to code professionally.
thanks for any advice.
This is probably a very easy/stupid question or I am over complicating a simple process. In any case, please advise..
If you have an instance of a class, which has an attribute (e.g Value) where the values can only be taken from a set list e.g {0,1,2,3,4,5,6,7}.
When writing code, when using this attribute one might type:
myClass.Value = 2
But if I wanted to make the line more abstract by saying
myClass.value = Tuesday
I could use an enumerated type outside of the class, where Tuesday would represent 2, Wednesday 3 etc.. to get this abstraction. However, is it better to create a class type library!?!?! e.g have something like (where myWeek is an instance of the class type)
myClass.Value = myWeek.Tuesday
I am getting confused, I am using VB6/VBA and whilst I could create a type library dll , I don't want this code to rely on external dll.
Is this how VB.NET works!?
Just trying to code professionally.
thanks for any advice.

Comment