Export (0) Print
Expand All

BitConverter.IsLittleEndian Field

Indicates the byte order ("endianess") in which data is stored in this computer architecture.

Namespace: System
Assembly: mscorlib (in mscorlib.dll)

public static readonly bool IsLittleEndian
public static final boolean IsLittleEndian
public static final var IsLittleEndian : boolean
Not applicable.

This value is true if the architecture is little-endian; false if it is big-endian.

Different computer architectures store data using different byte orders. "Big-endian" means the most significant byte is on the left end of a word. "Little-endian" means the most significant byte is on the right end of a word.

The following code example illustrates the use of the IsLittleEndian field.

// Example of the BitConverter.IsLittleEndian field.
using System;

class LittleEndDemo
{
    public static void Main( )
    {
        Console.WriteLine( 
            "This example of the BitConverter.IsLittleEndian field " +
            "generates \nthe following output when run on " +
            "x86-class computers.\n");
        Console.WriteLine( "IsLittleEndian:  {0}", 
            BitConverter.IsLittleEndian );
    }
}

/*
This example of the BitConverter.IsLittleEndian field generates
the following output when run on x86-class computers.

IsLittleEndian:  True
*/

// Example of the BitConverter.IsLittleEndian field.
import System.*;

class LittleEndDemo
{
    public static void main(String[] args)
    {
        Console.WriteLine(("This example of the BitConverter.IsLittleEndian "
            + "field generates \nthe following output when run on " 
            + "x86-class computers.\n"));
        Console.Write("IsLittleEndian:  ");
        Console.WriteLine(BitConverter.IsLittleEndian);
    } //main
} //LittleEndDemo

/*
This example of the BitConverter.IsLittleEndian field generates
the following output when run on x86-class computers.

IsLittleEndian:  True
*/

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0

XNA Framework

Supported in: 1.0

Community Additions

ADD
Show:
© 2014 Microsoft