|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
DataType as class memberI have a class called "Prop". I want that class to have a property
called "DataType" where the user can select and store a datatype. How can I store a DataType value in a class property. how the code would work in my mind: dim TempProp as new Prop TempProp.DataType = String You can use System.Type type and GetType operator for that purpose:
~ TempProp.DataType = GetType(String) ~ But if you have a limited set of types you can allow, then you may consider using an enum as well. Roman Show quoteHide quote "Bryan" <bryanv***@gmail.com> ???????/???????? ? ???????? ?????????: news:1148097720.943115.151590@j33g2000cwa.googlegroups.com... > I have a class called "Prop". I want that class to have a property > called "DataType" where the user can select and store a datatype. How > can I store a DataType value in a class property. > > how the code would work in my mind: > > dim TempProp as new Prop > TempProp.DataType = String >
logic gates in VB.NET 2005
string extraction VB.NET INI or XML file for path locations catching a specific exception Q: GIF image on a form Detect if compiling as a console application Service unable to start Send Image in .NET Remoting Standard Method for Importing/Exporting to DB Copying a project into another solution |
|||||||||||||||||||||||