Reurning Data Types

  • Thread starter Thread starter Jon Yates
  • Start date Start date
J

Jon Yates

Hello.

I have a combo box that I would like to populate with all
the data types that the .net framework supports (String,
Int, DataSet etc).

Is there any way that this can be done dynamically?

Cheers all,

Jon
 
Cheers 100, much appreciated.
-----Original Message-----

Hi John,
Yes, you can. You can reflect on the assemblies and extract all sclasses
which have ValueType for a base class. You can populate the combobox with
enums as well. Look for base class Enum. For DataSet you can look for
MarshalByValueComponent for a base class. You can consider only assemblies,
which you are interested of like: mscorlib.dll for primitive types as Int32,
system.data.dll for DataSet and so on.

HTH
B\rgds
100



.
 
Back
Top