Dynamically determine and cast type

Brady Kelly <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.clr
Message-ID <[email protected]>
I want to write a method that takes a Property object and a string as
parameters, and based on the type of the property, converts the string to
the correct type, with a null for empty strings, and assigns in to the
property.  I don't like the idea of using a switch, so how could I go about
this?


===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.