How to lookup and invoke a .Net TypeConverter for a particular type?

前端 未结 4 644
后悔当初
后悔当初 2020-12-28 22:06

I would like to implement a general purpose runtime type conversion function that makes use .Net TypeConverters to do the conversion.

Does anyone know how to how t

4条回答
  •  醉话见心
    2020-12-28 22:25

    In addition to Marc's answer, you might consider that ASP.NET's ViewState does a similar function to what you're asking to do. It tries to find the most efficient conversion.

    It might be worth a look at this page and possibly this one too.

提交回复
热议问题