I need to read a text file (Embedded resource) in my Xamarin.Forms PCL project. To work with files, xamarin docs offers this code:
var assembly = typeof(LoadResourceText).GetTypeInfo().Assembly; Stream stream = assembly.GetManifestResourceStream("WorkingWithFiles.PCLTextResource.txt"); string text = ""; using (var reader = new System.IO.StreamReader (stream)) { text = reader.ReadToEnd (); }
The problem is that I cannot find what LoadResourceText is. All I found is that it is a type in my assembly. But I canβt understand what this means.
And I cannot find anywhere a clear practical explanation of what I need to do.
Any help?
thanks
c # xamarin xamarin.forms
Dpedrinha
source share