Search code examples
c#.netmicrosoft-metro

Is GetTypeInfo missing in .NETCore 4.5.1?


I try to read an embedded resource (a font file in a Windows 8.1 Store App) as a Byte stream, but the Problem is the Access to the resource file. I often use

typeof(Type).GetTypeInfo.Assembly.GetMainfestResourceStream(...)

but the method GetTypeInfo() in the System.Reflection.Type of .NETCore v.4.5.1 doesn´t exist. Is a Lib-Reference-missing? I´m a little confused ^^


Solution

  • It is an extension method, adding using System.Reflection; is required to let the compiler recognize it.

    Thanks to Hans Passant