C# dynamic type conversions

前端 未结 4 1741
别那么骄傲
别那么骄傲 2020-12-14 05:09

We have 2 objects A & B: A is system.string and B is some .net primitive type (string,int etc). we want to write generic code to assign the converted (parsed) value of B

4条回答
  •  温柔的废话
    2020-12-14 05:21

    What's wrong with the already existing System.Convert class and the IConvertible interface?

提交回复
热议问题