อ่านในภาษาอังกฤษ แก้ไข

แชร์ผ่าน


IPAddress.GetAddressBytes Method

Definition

Provides a copy of the IPAddress as an array of bytes in network order.

public byte[] GetAddressBytes();

Returns

Byte[]

A Byte array.

Examples

The following code example shows how to get a server IP address in byte format.

Byte[] bytes = curAdd.GetAddressBytes();
for (int i = 0; i < bytes.Length; i++)
{
  Console.Write(bytes[i]);
}

Applies to