Created
February 28, 2018 18:15
-
-
Save BrunoCaimar/68481c422450eae24d72f7dfe8e2ad75 to your computer and use it in GitHub Desktop.
GravarObjectGraphModoBinario.cs
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
public static void GravarObjectGraphModoBinario(string fileName, object objeto2serialize) | |
{ | |
using (var stream = new FileStream("C:\\temp\\ObjectGraph.bin", | |
FileMode.OpenOrCreate, | |
FileAccess.ReadWrite, | |
FileShare.ReadWrite)) | |
{ | |
new BinaryFormatter().Serialize(stream, objeto2serialize) | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment