Last active
August 29, 2015 14:04
-
-
Save llytvynenko/edce3939a25a855d72ba to your computer and use it in GitHub Desktop.
This file contains 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
public void Main() | |
{ | |
//Stream class: http://msdn.microsoft.com/en-us/library/system.io.stream(v=vs.110).aspx | |
using (FileStream config = File.Open("some.config", FileMode.Open)) | |
using (FileStream otherConfig = File.Open("other.config", FileMode.Open)) | |
{ | |
CallLibrary(config, otherConfig); | |
} | |
} | |
public void CallLibrary(Stream config, Stream otherConfig) | |
{ | |
//Stream reader: http://msdn.microsoft.com/en-us/library/system.io.streamreader(v=vs.110).aspx | |
using (StreamReader configReader = new StreamReader(config)) | |
using (StreamReader otherConfigReader = new StreamReader(otherConfig)) | |
{ | |
var configContent = configReader.ReadToEnd(); | |
var otherConfigContent = otherConfigReader.ReadToEnd(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment