Created
January 9, 2019 15:38
-
-
Save LoriBru/178eaeaea5037fac7f77c7c34ee83584 to your computer and use it in GitHub Desktop.
Get a file from the project resources.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using (Stream stream = this.GetType().Assembly.GetManifestResourceStream("App.Resources." + "File.ext")) | |
| { | |
| if (stream == null) | |
| { | |
| throw new ArgumentException("No such resource", "File.ext"); | |
| } | |
| using (Stream output = File.OpenWrite(currentAnalysisPath + $@"\Resources\File.ext")) | |
| { | |
| stream.CopyTo(output); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment