HTML Colors in C#

There are many ways to specify HTML color codes in C#. The .net framework has a great object for dealing with colors called Color. Here are some of the ways that you can create a Color object. // if you have an HTML string var lightGray = System.Drawing.ColorTranslator.FromHtml(“#D3D3D3”); // if you have 3 hex numbers var lightGray = System.Drawing.Color.FromArgb(0xD3, 0xD3, […]

Read more

C# Text File

C# makes it extraordinarily easy to read and write text files. There is a static object called “File” (located in┬áSystem.IO) that does all the hard work for you. Look at how easy it is to read in a file, do some simple string processing on it, and then write it back out. // open a text file and read all […]

Read more
1 2 3