Skip to main content

Posts

Showing posts with the label C# Quick Programming

C# Shortcuts for quick programming

C# Shortcuts for quick programming   C# comes with full of surprises when you are doing the coding, here is the short list of commands that you can use it to generate the C# code automatically and quickly Enter prop and press tab 2 times (prop tab tab) Generate a property public int MyProperty { get ; set ; } class tab tab Generates a empty class         class MyClass         {                     } Ctor tab tab (inside the class) Generates a parameter less constructor             public MyClass()             {               } For tab tab Generates an empty for loop             for ( int i = 0; i < length; i++)             {                             } Foreach tab tab Generates an empty foreach loop               foreach ( var item in collection)             {                             } Do tab tab   Generates an empty do while loop               do              {                             } while