Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 ^^

like image 212
Shounbourgh Avatar asked Nov 12 '14 14:11

Shounbourgh


1 Answers

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

Thanks to Hans Passant

like image 55
Dagrooms Avatar answered Oct 17 '22 11:10

Dagrooms