How to

read file as bytes

Published: 16. December 2008 | Updated: 16. December 2008
License: Microsoft Public License (MS-PL)
Categories: File system » Files
Tags: C# File System Windows
Was this snippet helpful for you? YESYES / NONO

Snippet example shows how to read file as bytes

Import namespace

using System.IO;

Code

byte[] bytes = File.ReadAllBytes(@"C:\test.txt");
Send us feedback about this snippet »



Related Snippets: