BitConverter.IsLittleEndian Campo

Definición

Indica el orden de bytes ("modos endian") en los datos que se almacenan en la arquitectura de este equipo.Indicates the byte order ("endianness") in which data is stored in this computer architecture.

public: static initonly bool IsLittleEndian;
public static readonly bool IsLittleEndian;
 staticval mutable IsLittleEndian : bool
Public Shared ReadOnly IsLittleEndian As Boolean 

Valor de campo

Ejemplos

En el ejemplo de código siguiente se muestra el uso del campo IsLittleEndian.The following code example illustrates the use of the IsLittleEndian field.

// Example of the BitConverter::IsLittleEndian field.
using namespace System;
int 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.
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.
Module LittleEndDemo
    Sub Main( )
        Console.WriteLine( _
            "This example of the BitConverter.IsLittleEndian " & _
            "field generates " & vbCrLf & "the following output " & _
            "when run on x86-class computers." & vbCrLf )
        Console.WriteLine( "IsLittleEndian:  {0}", _
            BitConverter.IsLittleEndian )
    End Sub 
End Module

' This example of the BitConverter.IsLittleEndian field generates
' the following output when run on x86-class computers.
'
' IsLittleEndian:  True

Comentarios

Diferentes arquitecturas de equipos almacenan datos mediante diferentes pedidos de bytes.Different computer architectures store data using different byte orders. "Big-endian" significa que el byte más significativo está en el extremo izquierdo de una palabra."Big-endian" means the most significant byte is on the left end of a word. "Little-endian" significa que el byte más significativo está en el extremo derecho de una palabra."Little-endian" means the most significant byte is on the right end of a word.

Nota

Puede convertir del orden de bytes de la red al orden de bytes del equipo host sin recuperar el valor del campo BitConverter.IsLittleEndian pasando un entero de 16 bits, de 32 bits o de 64 bits al método IPAddress.HostToNetworkOrder.You can convert from network byte order to the byte order of the host computer without retrieving the value of the BitConverter.IsLittleEndian field by passing a 16-bit, 32-bit, or 64 bit integer to the IPAddress.HostToNetworkOrder method.

Se aplica a