Using Reflection in .NET Core

前端 未结 3 1667
悲&欢浪女
悲&欢浪女 2020-12-08 13:56

For cross-platform development, I\'m trying to make a .NET Core shared library. I used the Class Library (package) project template in VS 2015. My library nee

3条回答
  •  死守一世寂寞
    2020-12-08 14:45

    If you don't want your original code full of #if ... #else ... #endif statements, you could use a helper library like https://www.nuget.org/packages/ReflectionBridge/ which provides some extensions which define a bridge for the differences between Type and TypeInfo.

    (Source code at https://github.com/StefH/ReflectionBridge)

提交回复
热议问题