Пример #1
0
 public IPAddress(uint value)
 {
     m_addressBytes = IPAddressHelper.GetAddressBytes(value);
     m_value        = value;
     m_stringValue  = IPAddressHelper.GetAddressString(m_addressBytes);
     m_hostName     = new HostName(m_stringValue);
 }
Пример #2
0
        public IPAddress(byte[] addressBytes)
        {
            if (addressBytes == null)
            {
                throw new ArgumentNullException("addressBytes");
            }
            if (addressBytes.Length != 4)
            {
                throw new ArgumentOutOfRangeException("addressBytes");
            }

            m_addressBytes = addressBytes;
            m_value        = IPAddressHelper.GetAddressValue(m_addressBytes);
            m_stringValue  = IPAddressHelper.GetAddressString(m_addressBytes);
            m_hostName     = new HostName(m_stringValue);
        }