Hi,
I've been programming in VB6 so long that I have no idea how I would go about creating a class (OOP?) that would give me the following intellisense format when using my class.
I would like to create a class so that when I when I type Customer, which is my object, and press the period (.) key I will have intellisense options for .Address, .Name and .Phone.. Then if I pressed .Name I would get the intellisense for .First, .MI, etc.
I'm not sure of the best way to proceed, but if you can point me in the general direction, such as keywords I should use in a search and/or tutorial links, I will be more than happy to do the leg work.
I would just like to understand the basics of how to accomplish this, so that I can modify it for other needs, such as having a class to read MP3 tags.
string title = myMP3.IDv1.Title or
string title = myMP3.IDv2.Title or
string title = myMP3.Title, which would return return IDv2 if it was set, otherwise IDv1 or blank if neither were set.
If I am just overcomplicating things, please let me know.
Thanks in advance.
CT
I've been programming in VB6 so long that I have no idea how I would go about creating a class (OOP?) that would give me the following intellisense format when using my class.
VB.NET:
Customer.Name.First
Customer.Name.MI
Customer.Name.Last
Customer.Name.Prefix
Customer.Name.Suffix
Customer.Address.Line1.StreetNo
Customer.Address.Line1.StreetName
Customer.Address.Line1.UnitNo
Customer.Address.Line2.StreetNo
Customer.Address.Line2.StreetName
Customer.Address.Line2.UnitNo
Customer.Address.City
Customer.Address.State
Customer.Address.Zip
Customer.Address.Zip4
Customer.Phone.Cell
Customer.Phone.Fax
Customer.Phone.Home
Customer.Phone.Pager
Customer.Phone.Work.Number
Customer.Phone.Work.Extension
I would like to create a class so that when I when I type Customer, which is my object, and press the period (.) key I will have intellisense options for .Address, .Name and .Phone.. Then if I pressed .Name I would get the intellisense for .First, .MI, etc.
I'm not sure of the best way to proceed, but if you can point me in the general direction, such as keywords I should use in a search and/or tutorial links, I will be more than happy to do the leg work.
I would just like to understand the basics of how to accomplish this, so that I can modify it for other needs, such as having a class to read MP3 tags.
string title = myMP3.IDv1.Title or
string title = myMP3.IDv2.Title or
string title = myMP3.Title, which would return return IDv2 if it was set, otherwise IDv1 or blank if neither were set.
If I am just overcomplicating things, please let me know.
Thanks in advance.
CT