29 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
35 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
43 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
44 255, 255, 127, 0, 0, 1
115 if (value < 0 || value > uint.MaxValue)
129 return (
_numbers[0] & 0xFF00) == 65280;
141 return (
_numbers[0] & 0xFFC0) == 65152;
153 return (
_numbers[0] & 0xFFC0) == 65216;
177 return (
_numbers[0] & 0xFE00) == 64512;
191 for (
int i = 0; i < 5; i++)
198 return _numbers[5] == ushort.MaxValue;
202 [Obsolete(
"IPAddress.Address is address family dependent and has been deprecated. Use IPAddress.Equals to perform comparisons instead.")]
232 if (newAddress < 0 || newAddress > uint.MaxValue)
250 if (scopeid < 0 || scopeid > uint.MaxValue)
255 for (
int i = 0; i < 8; i++)
257 _numbers[i] = (ushort)(address[i * 2] * 256 + address[i * 2 + 1]);
264 ushort[]
array =
new ushort[8];
265 for (
int i = 0; i <
array.Length; i++)
267 array[i] = numbers[i];
294 for (
int i = 0; i < 8; i++)
296 _numbers[i] = (ushort)(address[i * 2] * 256 + address[i * 2 + 1]);
303 public static bool TryParse([NotNullWhen(
true)]
string? ipString, [NotNullWhen(
true)] out
IPAddress? address)
305 if (ipString ==
null)
311 return address !=
null;
317 return address !=
null;
322 if (ipString ==
null)
363 for (
int i = 0; i < 8; i++)
381 byte[]
array =
new byte[16];
385 byte[] array2 =
new byte[4];
465 return (address.
PrivateAddress & num) == (Loopback.PrivateAddress & num);
468 public override bool Equals([NotNullWhen(
true)]
object? comparand)
472 return Equals(comparand2);
static readonly bool IsLittleEndian
static sbyte ReverseEndianness(sbyte value)
static IPAddress Parse(ReadOnlySpan< char > ipSpan, bool tryParse)
static unsafe string IPv4AddressToString(uint address)
static string IPv6AddressToString(ushort[] address, uint scopeId)
ReadOnlyIPAddress(ReadOnlySpan< byte > newAddress)
static int NetworkToHostOrder(int network)
static readonly IPAddress Broadcast
static IPAddress Parse(ReadOnlySpan< char > ipSpan)
static readonly IPAddress IPv6None
static readonly IPAddress None
IPAddress(ReadOnlySpan< ushort > numbers, uint scopeid)
static readonly IPAddress IPv6Loopback
static int HostToNetworkOrder(int host)
static IPAddress Parse(string ipString)
static readonly IPAddress Loopback
IPAddress(ReadOnlySpan< byte > address)
static byte[] ThrowAddressNullException()
static bool IsLoopback(IPAddress address)
static long HostToNetworkOrder(long host)
static long NetworkToHostOrder(long network)
override int GetHashCode()
readonly ushort[] _numbers
override string ToString()
static short NetworkToHostOrder(short network)
static short HostToNetworkOrder(short host)
bool TryWriteBytes(Span< byte > destination, out int bytesWritten)
bool TryFormat(Span< char > destination, out int charsWritten)
override bool Equals([NotNullWhen(true)] object? comparand)
static bool TryParse([NotNullWhen(true)] string? ipString, [NotNullWhen(true)] out IPAddress? address)
IPAddress(long newAddress)
static readonly IPAddress Any
IPAddress(ReadOnlySpan< byte > address, long scopeid)
static bool TryParse(ReadOnlySpan< char > ipSpan, [NotNullWhen(true)] out IPAddress? address)
void WriteIPv4Bytes(Span< byte > destination)
IPAddress(ushort[] numbers, uint scopeid)
static readonly IPAddress IPv6Any
static readonly IPAddress s_loopbackMappedToIPv6
IPAddress(byte[] address, long scopeid)
IPAddress(byte[] address)
void WriteIPv6Bytes(Span< byte > destination)
bool Equals(IPAddress comparand)
AddressFamily AddressFamily
static string dns_bad_ip_address