c# - .NETCore 4.5.1 中是否缺少 GetTypeInfo?

标签 c# .net microsoft-metro

我尝试将嵌入式资源(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.

感谢Hans Passant

关于c# - .NETCore 4.5.1 中是否缺少 GetTypeInfo?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26889652/

相关文章:

c# - 将 Expression<Func<IBar, T>> 转换为 Expression<Func<Bar, T>>

.net - Windows CNG 自定义 key 存储提供程序

c# - 如何使用C#从Windows Metro Apps中的麦克风捕获PCM数据

windows-8 - 在 Metro 应用程序上从 Canvas 获取图像文件

xaml - Windows Phone 8.1 Silverlight - 如何仅禁用应用程序的黑白主题

c# - 如何创建解析器(lex/yacc)?

javascript - 如何从包含多个对象数组的Json数据中提取多个对象数组?

c# - 从安装程序自定义操作运行 Entity Framework 迁移

c# - 检查 StreamReader 是否可以读取另一行

c# - 使用 .NET 图像转换是否足够?