In Test/System.Data:
[mono-project.git] / mono / tests / ipaddress.cs
blobfbb7acb8654d2df0c9ae1d190a8741b46eddbf6e
1 using System.Net;
2 using System.Net.Sockets;
3 using System.IO;
4 using System;
6 namespace T {
7 public class T {
9 public static int Main () {
12 Console.WriteLine ("address is " + IPAddress.NetworkToHostOrder (0x0100007f).ToString("X"));
15 IPAddress testadd = IPAddress.Parse ("127.0.0.1");
16 Console.WriteLine("address is " + testadd.Address.ToString ("X"));
17 if (testadd.Address != 0x0100007f)
18 return 1;
21 IPAddress hostadd = new IPAddress(0x0100007f);
22 Console.WriteLine("address is " + hostadd.ToString());
23 if (hostadd.ToString() != "127.0.0.1")
24 return 1;
26 return 0;