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 (true);
While tab tab
Generates an empty while loop
while (true)
{
}
If tab tab
Generates an empty if condition
if (true)
{
}
Else tab tab
Generates an empty else condition
else
{
}
Try tab tab
Generates a try with catch
try
{
}
catch (Exception)
{
throw;
}
Tryf tab tab
Generates a try with
finally
try
{
}
finally
{
}
To view the detailed explanation with examples please visit here
(To Be continued)
Comments