Click here to Skip to main content
15,885,365 members
Articles / Programming Languages / C#
Article

.NET Useful Functional Class Library

Rate me:
Please Sign up or sign in to vote.
3.77/5 (30 votes)
16 Nov 2006CPOL3 min read 54.1K   1.4K   76   8
This code includes lots of algorithms and desired code segments for .NET. Written entirely in C#.

Introduction

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 - TBMultiFunctionLibrary.SecurityEngine)

  • HashAlgorithmEngine:
    • SHA, SHA256, SHA384, SHA512, MD5

Encryption algorithms (xcrypt.cs - TBMultiFunctionLibrary.SecurityEngine)

  • SymmetricAlgorithmEngine:
    • AES, DES, RC2, Rijndael, TripleDES, BlowFish, Twofish
    • TBMultiFunctionLibrary.AES->Implementation of AES

Operating System Management (TBMultiFunctionLibrary.OSManagementUtil)

  • Shut down computer
  • Add new user to Windows
  • Change Windows password
  • Get username / machinename
  • Get processlist
  • Run or kill processes

Mail Objects (TBMultiFunctionLibrary.Mail)

  • 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 (TBMultiFunctionLibrary.SQL)

  • Execute commands, transactions, stored procedures
  • Manages your database

HTTP Web Request/Response Classes (TBMultiFunctionLibrary.HTTPWebObject)

  • Get URL
  • Post data
  • Proxy objects
  • Manage cookies and errors
  • Includes events

High Performance Timer (TBMultiFunctionLibrary.PerformanceTimer)

  • Uses 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 (TBMultiFunctionLibrary.SortAlgorithms)

  • This part includes only one fast sorting algorithm but will be developed.

Computer Based States(TBMultiFunctionLibrary.ComputerState)

  • Methods: IsConnectedToInternet, isTabletPC.
  • This part will also be developed.

Conversions (TBMultiFunctionLibrary.Conversion)

  • Hexadecimal to Binary and vice versa conversions
  • This part will also include more universal conversion of different metrics.

Clipboard Data Access (TBMultiFunctionLibrary.ClipBoard)

  • Write and read data to/from different data types (even image)

Socket Class for Client Side (TBMultiFunctionLibrary.ClientSocket)

  • 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 (TBMultiFunctionLibrary.Hardware)

  • 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 (TBMultiFunctionLibrary.Profile)

  • 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.

Conclusion

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.

Happy coding!

History

  • 16th November, 2006: Initial post

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
CEO Gravi Information Technologies and Consultancy Ltd
Turkey Turkey
Currently, also an MSc. student in Technical University of Munich, I develop practical application in computer vision for more than 5 years. I design real-time solutions to industrial and practical vision problems, both 3D and 2D. Very interested in developing algorithms in C relating math and vision.

Please visit Gravi's web page (http://www.gravi.com.tr) and my page (http://www.tbirdal.me) to learn more about what we develop.

I admire performance in algorithms.

"Great minds never die, they just tend to infinity..."

Comments and Discussions

 
GeneralMy vote of 5 Pin
Manoj Kumar Choubey20-Feb-12 19:14
professionalManoj Kumar Choubey20-Feb-12 19:14 
Generalthat's good Pin
ssxcome16-Feb-09 20:40
ssxcome16-Feb-09 20:40 
QuestionI'm working on something like.... Pin
User 451897317-Nov-08 12:29
User 451897317-Nov-08 12:29 
AnswerRe: I'm working on something like.... Pin
Tolga Birdal17-Nov-08 13:17
Tolga Birdal17-Nov-08 13:17 
Generalsmall bug possibly in AES implementation Pin
gen-dos24-Sep-08 3:59
gen-dos24-Sep-08 3:59 
GeneralRe: small bug possibly in AES implementation Pin
Tolga Birdal16-Oct-08 13:09
Tolga Birdal16-Oct-08 13:09 
GeneralAwesome!!! Pin
Mark James Newman9-May-07 5:49
Mark James Newman9-May-07 5:49 
GeneralLooks good !!! Pin
Gh0stman17-Nov-06 0:59
Gh0stman17-Nov-06 0:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.