Showing posts with label Winforms. Show all posts
Showing posts with label Winforms. Show all posts

Tuesday, May 10, 2011

why the entry point of C# should be static void Main()

here is a couple of links which says the answer properly

Msdn: http://msdn.microsoft.com/en-us/library/acy3edy3.aspx
SO:http://stackoverflow.com/questions/5954439/c-entry-point-function

why the method name should be Main()

The using System; directive references a namespace called System that is provided by the Common
Language Infrastructure (CLI) class library. This namespace contains the Console class referred to in
the Main method.

taken from ecma-international

Wednesday, May 4, 2011

How to Format date in DataPicker

calanderFrom.Format = DateTimePickerFormat.Short;
calanderFrom
.CustomFormat = "dd MMM yyyy";

always give "dd/mm/yyyy
you have to do it in

calanderFrom.Format = DateTimePickerFormat.Custom
 calanderFrom.CustomFormat = "dd MMM yyyy";
Msdn Link
http://msdn.microsoft.com/en-us/library/h2ef6zxz.aspx
http://msdn.microsoft.com/en-us/library/aa236616(v=vs.60).aspx

SO Link
http://stackoverflow.com/questions/5893626/datepicker-is-not-picking-custom-date-format