|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Anyway to convert an object type using a System.Type?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 It depends on which types you're dealing with. The>System.Type object containing the desired type to convert to or a string >variable containing the name of the type to convert to? System.ComponentModel.TypeConverter class may be useful. Mattias -- Mattias Sjögren [MVP] mattias @ mvps.org http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com Please reply only to the newsgroup. "Mattias Sjögren" <mattias.dont.want.spam@mvps.org> wrote in message I'm dealing with custom classes.news:eyYKctsPFHA.2724@TK2MSFTNGP10.phx.gbl... > >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. |
|||||||||||||||||||||||