public UInt32 Value { get { return this._value; } set { this._value = value; } } public Byte Text1 { get { return this._text1; } set { this._text1 = value; } } public Byte Text2 { get { return this._text2; } set { this._text2 = value; } } public Byte Text3 { get { return this._text3; } set { this._text3 = value; } } public Byte Text4 { get { return this._text4; } set { this._text4 = value; } }
class Program { static void Main(string[] args) { IP ip = new IP(192,168,1,1); Console.WriteLine(ip); UInt32 value = (UInt32)ip; Console.WriteLine(value); Console.WriteLine(ip.Value); IP ip2 = (IP)(1234567); Console.WriteLine(ip2);