Reading a file stream from resource file in C#

I am currently in the process of migrating all the blog content of this site over to my other site which is dedicated to all Information Technology , and is more focused on Software Development, Software Engineering and technology in general.

You will be able to find this post at the following URL

http://www.threenine.co.uk/blog/reading-a-file-stream-from-resources/

We will be repurposing FitGeekDad over the next few months and it will be undergoing some very exciting updates!

  • m2o2r2g2

    FYI after you read the manual you quoted ‘ Resources.Properties.FileName’ but then in the unit test you quoted ‘Properties.Resources.test’.

    • http://www.fitgeekdad.com/ Gary Woodfine

      Thanks for the taking the time to comment.

      I thought it would be clear enough, where I took time to add the lines:

      “Where FileName is the name of my file in the Resource. Simple! Easy! any
      idiot could do it! Well apparently not this idiot, without spending 45
      Minutes of his life in a state of mental agony!”

      test is the name of the file that I added to Resources, I assumed this would be apparent, with the screen shot I added of the file in resources?

      I referenced the file correctly in my test , i.e. Properties.Resources.test

      test is the name of the file in resources. Apologies if this was clear enough