Tell FFFFFFFE
how to get a value equal to FFFFFFFE
turns out to output only EFFFF
in reverse order and without the first two characters FF
Source Code: # 1
var cidr = 23; var zeroBits = 32 - cidr; var result = uint.MaxValue; result &= (uint)((((ulong)0x1 << cidr) - 1) << zeroBits); result = (uint)IPAddress.HostToNetworkOrder((int)result); textBoxHex.Text = result.ToString("X");
IPAddress.HostToNetworkOrder
) if there is a simpler way, tell me. - Vitokhv 2:17 pm