K
Ken Varn
I have an unknown numeric Type object passed into a function. I want to run
a conversion on a string to convert the string to that Type object and
return an object of that type. Is there some way to do a generic cast or
conversion on the type?
Here is sort of what I want to do:
object MyFunc(Type T, String Str)
{
object o;
o = // Want to convert Str to be of type T here.
return o; // Want to return an object of Type T here that has the
converted value.
}
--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.
EmailID = varnk
Domain = Diebold.com
-----------------------------------
a conversion on a string to convert the string to that Type object and
return an object of that type. Is there some way to do a generic cast or
conversion on the type?
Here is sort of what I want to do:
object MyFunc(Type T, String Str)
{
object o;
o = // Want to convert Str to be of type T here.
return o; // Want to return an object of Type T here that has the
converted value.
}
--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.
EmailID = varnk
Domain = Diebold.com
-----------------------------------