By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,386 Members | 1,705 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,386 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
>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 [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 21 '05 #2

P: n/a
Don
"Mattias Sjögren" <ma********************@mvps.org> wrote in message
news:ey**************@TK2MSFTNGP10.phx.gbl...
Is there anyway to convert an object from one type to another using either aSystem.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.


I'm dealing with custom classes.
Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.