Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ IPAddress() [3/7]

System.Net.IPAddress.IPAddress ( ReadOnlySpan< byte > address,
long scopeid )
inline

Definition at line 244 of file IPAddress.cs.

245 {
246 if (address.Length != 16)
247 {
248 throw new ArgumentException(System.SR.dns_bad_ip_address, "address");
249 }
250 if (scopeid < 0 || scopeid > uint.MaxValue)
251 {
252 throw new ArgumentOutOfRangeException("scopeid");
253 }
254 _numbers = new ushort[8];
255 for (int i = 0; i < 8; i++)
256 {
257 _numbers[i] = (ushort)(address[i * 2] * 256 + address[i * 2 + 1]);
258 }
259 PrivateScopeId = (uint)scopeid;
260 }
readonly ushort[] _numbers
Definition IPAddress.cs:49
static string dns_bad_ip_address
Definition SR.cs:28
Definition SR.cs:7

References System.Net.IPAddress._numbers, System.SR.dns_bad_ip_address, System.ReadOnlySpan< T >.Length, and System.Net.IPAddress.PrivateScopeId.