GST Billing Software

header image

FORMATTING CODE

Erachana Line

The Visual Studio Code Editor gives you the ability to format your code with options such as indenting, hiding text, and so on. The language engine also provides features to auto-format your code as you type through Smart Indenting.

Ø To Indent code:

1. Select the text you want to indent.

2. Click the TAB key, or Press Ctrl+ K, Ctrl+ D, or click Indent .

Ø To unindent code:

3. Select the text you want to unindent.

4. Press SHIFT+TAB key, or click Unindent .

Ø To Comment:

1. Select the text you want to comment.

2. Press Ctrl+ K, Ctrl+ C, or click Comment ..

3. Comments should be on the same level as the code (use the same level of indentation).

Example: //To clear Text box

txtRemark.Text = "";

Ø To Uncomment:

1. Select the text you want to comment.

2. To uncomment Press Ctrl+ K, Ctrl+ U, or click Uncomment .

Ø Always place curly braces ({ and }) in a new line.

Ø To Hide Text

By default, all text is displayed in the Code Editor, but in some circumstances you can hide the code from view.

Use #region to group related pieces of code together. If you use proper grouping using #region, the page should look like this when all definitions are collapsed.