## 多載

 NetworkToHostOrder(Int32) 將整數值從網路位元組順序轉換為主機位元組順序。Converts an integer value from network byte order to host byte order. NetworkToHostOrder(Int64) 將長整數值從網路位元組順序轉換為主機位元組順序。Converts a long value from network byte order to host byte order. NetworkToHostOrder(Int16) 將短整數值從網路位元組順序轉換為主機位元組順序。Converts a short value from network byte order to host byte order.

## NetworkToHostOrder(Int32)

``````public:
static int NetworkToHostOrder(int network);``````
``public static int NetworkToHostOrder (int network);``
``static member NetworkToHostOrder : int -> int``
``Public Shared Function NetworkToHostOrder (network As Integer) As Integer``

network
Int32

### 範例

``````void NetworkToHostOrder_Integer( int networkByte )
{
int hostByte;
// Converts an integer value from network Byte order to host Byte order.
Console::WriteLine( "Network Byte order to Host Byte order of {0} is {1}", networkByte, hostByte );
}
``````
``````public void NetworkToHostOrder_Integer(int networkByte)
{
int hostByte;
// Converts an integer value from network byte order to host byte order.
Console.WriteLine("Network byte order to Host byte order of {0} is {1}", networkByte, hostByte);
}
``````
``````Public Sub NetworkToHostOrder_Integer(networkByte As Integer)
Dim hostByte As Integer
' Converts an integer value from network byte order to host byte order.
Console.WriteLine("Network byte order to Host byte order of {0} is {1}", networkByte, hostByte)
End Sub
``````

### 備註

NetworkToHostOrder 方法會將存放在主機系統上的多位元組整數值，從網路使用的位元組順序轉換成主機所使用的位元組順序。The NetworkToHostOrder method converts multibyte integer values that are stored on the host system from the byte order used by the network to the byte order used by the host.

## NetworkToHostOrder(Int64)

``````public:
static long NetworkToHostOrder(long network);``````
``public static long NetworkToHostOrder (long network);``
``static member NetworkToHostOrder : int64 -> int64``
``Public Shared Function NetworkToHostOrder (network As Long) As Long``

network
Int64

### 範例

``````void NetworkToHostOrder_Long( __int64 networkByte )
{
__int64 hostByte;
// Converts a long value from network Byte order to host Byte order.
Console::WriteLine( "Network Byte order to Host Byte order of {0} is {1}", networkByte, hostByte );
}
``````
``````public void NetworkToHostOrder_Long(long networkByte)
{
long hostByte;
// Converts a long value from network byte order to host byte order.
Console.WriteLine("Network byte order to Host byte order of {0} is {1}", networkByte, hostByte);
}
``````
``````Public Sub NetworkToHostOrder_Long(networkByte As Long)
Dim hostByte As Long
' Converts a long value from network byte order to host byte order.
Console.WriteLine("Network byte order to Host byte order of {0} is {1}", networkByte, hostByte)
End Sub
``````

### 備註

NetworkToHostOrder 方法會將存放在主機系統上的多位元組整數值，從網路使用的位元組順序轉換成主機所使用的位元組順序。The NetworkToHostOrder method converts multibyte integer values that are stored on the host system from the byte order used by the network to the byte order used by the host.

## NetworkToHostOrder(Int16)

``````public:
static short NetworkToHostOrder(short network);``````
``public static short NetworkToHostOrder (short network);``
``static member NetworkToHostOrder : int16 -> int16``
``Public Shared Function NetworkToHostOrder (network As Short) As Short``

network
Int16

### 範例

``````void NetworkToHostOrder_Short( short networkByte )
{
short hostByte;
// Converts a short value from network Byte order to host Byte order.
Console::WriteLine( "Network Byte order to Host Byte order of {0} is {1}", networkByte, hostByte );
}
``````
``````public void NetworkToHostOrder_Short(short networkByte)
{
short hostByte;
// Converts a short value from network byte order to host byte order.
Console.WriteLine("Network byte order to Host byte order of {0} is {1}", networkByte, hostByte);
}
``````
``````Public Sub NetworkToHostOrder_Short(networkByte As Short)
Dim hostByte As Short
' Converts a short value from network byte order to host byte order.