Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- // OR use BitConverter.IsLittleEndian
- class Program
- {
- unsafe static void Main() {
- int num = 1;
- bool le = *(byte*)&num == 1;
- Console.WriteLine("{0} endian", le ? "LITTLE" : "BIG");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment