In my .NET applications, I use several types of classes for several types of different applications. You never know, what you come across. This is a series of classes which any C# user may search in Google and spend considerable amount of time to find. Most of these classes I have taken from The Code Project and this can be considered as a tribute to The Code Project. Of course, there are my implementations all over the place but there is also code taken from The Code Project. So thanks to those who contributed in developing some part of this work. Because it's a huge project, I won't go into the details of the code in the article. However there are comments in the code in several places (not all). Moreover, using the code is very straightforward.
You can take it and use it wherever you want since it's a collection of different useful classes.
Using The Code
WHAT DOES IT INCLUDE? Good question.
Hashing algorithms (xcrypt.cs -
- SHA, SHA256, SHA384, SHA512, MD5
Encryption algorithms (xcrypt.cs -
- AES, DES, RC2, Rijndael, TripleDES, BlowFish, Twofish
TBMultiFunctionLibrary.AES->Implementation of AES
Operating System Management (
- Shut down computer
- Add new user to Windows
- Change Windows password
- Get username / machinename
- Get processlist
- Run or kill processes
Mail Objects (
- Simple mail program can be implemented
- Send and get mails over internet
- Find mails, etc. (Requires Outlook to be configured)
SQL Server ADO.NET Connection Class (
- Execute commands, transactions, stored procedures
- Manages your database
HTTP Web Request/Response Classes (
- Get URL
- Post data
- Proxy objects
- Manage cookies and errors
- Includes events
High Performance Timer (
QueryPerformanceCounter (the most precise timer) to measure time.
- Acts as a cronometer.
- You can use it to measure the execution time of your code.
Sort Algorithms (
- This part includes only one fast sorting algorithm but will be developed.
Computer Based States(
- This part will also be developed.
- Hexadecimal to Binary and vice versa conversions
- This part will also include more universal conversion of different metrics.
Clipboard Data Access (
- Write and read data to/from different data types (even image)
Socket Class for Client Side (
- A class that's able to transmit data to a certain server over TCP/IP using .NET sockets.
- Don't be afraid. It's very easy to use.
- Events are also included.
Hardware Information Class (
- Get detailed information on the hardware that this code runs on. You can get: CPU ID, Hard Disk information, Volume information, MAC Address, IP and computer name, etc.
Profile XML, INI, Registry Reader/Writer (
- This class is able to perform I/O nearly for all of the computer devices such as registry, INI file, XML, etc.
- It supports events.
- Please refer to this article for more details.
Ok, now the hard part (knowing the objects) is complete. It's really simple to use any of those classes. Just declare an object. Give parameters required if necessary (most of the time it is not) and call the method you want to call with its parameters. As I said before, I cannot specify any demonstration or code explanation because there are a huge amount of classes given.
This is all for now. If you have any questions, please e-mail.
- 16th November, 2006: Initial post