我尝试将嵌入式资源(Windows 8.1 商店应用程序中的字体文件)作为字节流读取,但问题是对资源文件的访问。我经常用
typeof(Type).GetTypeInfo.Assembly.GetMainfestResourceStream(...)
但是 .NETCore v.4.5.1 的 System.Reflection.Type 中的方法 GetTypeInfo()
不存在。是否缺少 Lib-Reference?我有点困惑^^
最佳答案
It is an extension method, adding
using System.Reflection;
is required to let the compiler recognize it.
关于c# - .NETCore 4.5.1 中是否缺少 GetTypeInfo?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26889652/