Reurning Data Types

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
 
J

Jon Yates

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



.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top