BitConverter.IsLittleEndian 필드

정의

이 컴퓨터 아키텍처에서 데이터가 저장되는 바이트 순서("endian")를 나타냅니다.

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

필드 값

예제

다음 코드 예제에서는 필드의 사용을 보여 줍니다 IsLittleEndian .

// 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
*/
open System

printfn $"This example of the BitConverter.IsLittleEndian field generates \nthe following output when run on x86-class computers.\n"
printfn $"IsLittleEndian:  {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

설명

다른 컴퓨터 아키텍처는 서로 다른 바이트 주문을 사용하여 데이터를 저장합니다. "Big-endian"은 단어의 왼쪽 끝에 가장 중요한 바이트가 있다는 것을 의미합니다. "Little-endian"은 단어의 오른쪽 끝에 가장 중요한 바이트가 있다는 것을 의미합니다.

참고

16비트, 32비트 또는 64비트 정수 를 메서드에 전달하여 필드 값을 검색하지 않고 네트워크 바이트 순서에서 호스트 컴퓨터의 BitConverter.IsLittleEndian 바이트 순서로 변환할 IPAddress.HostToNetworkOrder 수 있습니다.

적용 대상