Browse by Tags

How do I calculate a MD5 hash from a string?
09 October 06 11:15 AM
It is a common practice to store passwords in databases using a hash. MD5 (defined in RFC 1321 ) is a common hash algorithm, and using it from C# is easy. Here’s an implementation of a method that converts a string to an MD5 hash, which is a 32-character Read More...
Postedby CSharpFAQ | 4 Comments    
Filed under:
How do I play default Windows sounds?
27 March 06 07:03 PM
Sometimes, you might want to make your application a bit more audible. If you are using .NET 2.0, you can utilize the new System.Media namespace and its SystemSound and SystemSounds classes. The SystemSounds class contains five static properties that Read More...
Postedby CSharpFAQ | 2 Comments    
Filed under:
Where can I find design and coding guidelines for .NET?
21 February 05 01:30 PM
tipu_77 asked "What are microsoft suggested naming conventions in C#?" The .NET Framework Team collects their recommendations at their GotDotNet community site . which points to a fairly comprehensive MSDN page Design Guidelines for Class Library Developers Read More...
Postedby CSharpFAQ | 5 Comments    
How do I get and set Environment variables?
02 December 04 09:01 AM
Use the System.Environment class. Specifically the GetEnvironmentVariable and SetEnvironmentVariable methods. Admitedly, this is not a question specific to C#, but it is one I have seen enough C# programmers ask, and the ability to set environment variables Read More...
Postedby CSharpFAQ | 7 Comments    
Filed under: , ,
What is the equivalent to regsvr32 in .NET?
02 August 04 02:15 PM
Where you once used Regsvr32 on unmanaged COM libraries, you will now use Regasm on managed .NET libraries. “ Regsvr32 is the command-line tool that registers .dll files as command components in the registry“ “Regasm.exe, the Assembly Read More...
Postedby CSharpFAQ | 9 Comments    
Filed under:
How can I run another application or batch file from my Visual C# .NET code?
01 June 04 11:54 PM
Posted by: Duncan Mackenzie , MSDN This post applies to Visual C# .NET 2002/2003 Suppose you want to run a command line application, open up another Windows program, or even bring up the default web browser or email program... how can you do this from Read More...
Postedby CSharpFAQ | 22 Comments    
Filed under:

This Blog

Syndication

Page view tracker