Wednesday, April 30, 2014

C# time difference between two times

       DateTime dtFrom = DateTime.Parse("3:00 PM");  
       DateTime dtTo = DateTime.Parse("5:00 PM");  
       DateTime now = DateTime.Now;  
       if ((now>=dtFrom) && now<= dtTo )  
       // Do Something  

C# print file on LAN Printer

If you want to print any file on network printer then you can try with this code block // Change Default Printer System.Ma...