Anyway to convert an object type using a System.Type?

  • Thread starter Thread starter Don
  • Start date Start date
D

Don

Is there anyway to convert an object from one type to another using either a
System.Type object containing the desired type to convert to or a string
variable containing the name of the type to convert to?

- Don
 
Is there anyway to convert an object from one type to another using either a
System.Type object containing the desired type to convert to or a string
variable containing the name of the type to convert to?

It depends on which types you're dealing with. The
System.ComponentModel.TypeConverter class may be useful.



Mattias
 
Mattias Sjögren said:
It depends on which types you're dealing with. The
System.ComponentModel.TypeConverter class may be useful.

I'm dealing with custom classes.
 
Back
Top