Quantcast
Channel: User Just code - Stack Overflow
Viewing all articles
Browse latest Browse all 41

Answer by Just code for Read a Resourse file using Assembly GetManifestResourceStream method using C#

$
0
0

Try this:

var resourceName = "SingleSignOn.idsrv3test.pfx";using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)){  TextReader tr = new StreamReader(stream);  string fileContents = tr.ReadToEnd();}

Note: Put the file as an embedded resource. file > right click > properties > build action > select embedded resource.


Viewing all articles
Browse latest Browse all 41

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>