Posts

Showing posts from August, 2011

Donate

.NET Framework Version Checker in your PC Using C#

Here's a repost of a .NET Version Checker I found in the internet. const string regLocation = "SOFTWARE\\Microsoft\\NET Framework Setup\\NDP" ; static void Main( string [] args){ Console.WriteLine( ".NET Framework versions installed" ); Console.WriteLine( "---------------------------------" ); Console.WriteLine(); RegistryKey masterKey = Registry.LocalMachine.OpenSubKey(regLocation); RegistryKey tempKey; if (masterKey == null ) { Console.WriteLine( "Null Key!" ); } else { string [] SubKeyNames = masterKey.GetSubKeyNames(); for ( int i = 0; i < SubKeyNames.Length; i++) { tempKey = Registry.LocalMachine.OpenSubKey (regLocation + "\\" + SubKeyNames[i]); Console.Write(SubKeyNames[i]); Console.WriteLine( "\t

The Error: 417 "Expectation Failed." During Webrequest In C#

Here's a solution on how to fix the 417 expectation failed error during WebRequest In C#. System.Net.ServicePointManager.Expect100Continue = false ;

How To Insert Date Object In MySQL Using C#.NET

Hello, To insert date object using C#.net in MySQL db,use the code below: string query = String.Format( "Insert into tbllistings(DateRegistered)" + "values(DATE_FORMAT({0}, '%Y-%m-%d %h:%m:%s'))" ,objJobs.DateRegistered); The key to the solution is using the MySQL Date format function.

Disable WindowsForms Form From Being Resized At Design Time In C#

Here's a snippet on how to prevent or disable winforms form object from being resized at design time. this .MaximumSize = new System.DrawingSize(500, 400); this .MinimumSize = new System.DrawingSize(500, 400);

Donate