posted in C#, Coders corner on Aug 31st, 2010
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 using System; using System.IO; namespace FileHandling { public class FileHandling { static void Main(string[] Args) { StreamReader lStrReader; [...]
read full post »
posted in C#, Coders corner on Aug 31st, 2010
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 using System; using System.IO; namespace FileHandling { public class FileHandling { static void Main(string[] Args) { FileStream lFStream; StreamReader lStrReader; [...]
read full post »
posted in C#, Coders corner on Aug 31st, 2010
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 using System; using System.Text.RegularExpressions; namespace RegexTest { public class RegexTest { static void Main() { string lText = "Kevin David Mitnick is a computer " + "security consultant [...]
read full post »
posted in C#, Coders corner on Aug 31st, 2010
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 using System; using System.Text.RegularExpressions; namespace RegexTest { public class RegexTest { static void Main() { string lText = "Kevin David Mitnick is [...]
read full post »
posted in C#, Coders corner on Aug 15th, 2010
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 using System; using System.Threading; namespace Threading { public class Program { protected static void threadFunction() { Console.WriteLine("Inside the thread. "); while (true) { [...]
read full post »
posted in C#, Coders corner on Aug 15th, 2010
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 using System; using System.Threading; namespace Threading { public class Program { static bool mStopThread = false; protected static void threadFunction() { [...]
read full post »
posted in C#, Coders corner on Aug 14th, 2010
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 using System; using System.Threading; namespace Threading { public class Program { protected static void threadFunction() { int lCounter; for (lCounter = 0; lCounter < [...]
read full post »
posted in C#, Coders corner on Aug 14th, 2010
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 using System; using System.Collections.Generic; using System.Text; using System.Net; namespace HostName { public class Program { static void Main(string[] args) { String lComputerName = Dns.GetHostName(); IPAddress[] localIPs = Dns.GetHostAddresses(lComputerName); if (localIPs.Length > 0) foreach [...]
read full post »
posted in C#, Coders corner on Aug 14th, 2010
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 using System; using System.Collections.Generic; using System.Text; using System.Net; namespace HostName { public class Program { static void Main(string[] args) { string lHostName = Dns.GetHostName(); Console.WriteLine("Host name : " + lHostName); } } }
read full post »
posted in C#, Coders corner on Aug 13th, 2010
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 using System; using System.Text; using System.Net; namespace HostName2IP { class Program { static void Main(string[] args) { IPHostEntry lHost = Dns.GetHostByName("www.google.com"); IPAddress lIPAddr = lHost.AddressList[0]; Console.WriteLine(lIPAddr); } } }
read full post »