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

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

Post by Don » Wed, 13 Apr 2005 03:50:25


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
 
 
 

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

Post by Mattias Sj » Wed, 13 Apr 2005 04:19:10

>Is there anyway to convert an object from one type to another using either a

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



Mattias

--
Mattias Sjren [MVP] mattias @ mvps.org
http://www.yqcomputer.com/ | http://www.yqcomputer.com/
Please reply only to the newsgroup.

 
 
 

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

Post by Don » Wed, 13 Apr 2005 04:39:09


either a

I'm dealing with custom classes.