A C# method for calculating the CRC32 checksum on an array of bytes. The code uses a CRC32 table and makes use of C#’s bitwise operators to return the checksum of the bytes passed.
Draw rounded corner rectangles
The RoundedCornerRectangle() method uses the GDI+ class to draw rectangles with rounded corners. It draws the graphic to a Graphics object that was passed to the method.
Put a string into byte array
The StringToByteArr() is a two line function that puts a string into a byte array, often needed in order to transfer a string via a network.
List All Running Processes
Get a list of all running Windows processes through which you can step using a foreach loop.
Capitalize each word in a string
The CapitalizeString method uses regular expressions to capitalize every word in a string.
Execute A File Or Application
Get your .NET application to open a file using the operating system’s file type assignments, just like the file would open when double clicked.
Get a list of installed printers
Using a foreach loop in C# to retrieve a list of all installed printers (available or unavailable.)
Encrypting a string using the MD5 algorithm
Getting web page content and headers
This tutorial will teach you how to retrieve the http response from a server using C#. Learn how to get the content of a page, the header returned by the server, and how to pass different details to it, such as the referrer and User Agent.
Compiling from the Command Prompt
This tutorial shows you how you can compile a simple piece of code from the C# command prompt compiler and how to add references.