ankitweblogic logo
W e b t u t o r i a l s

Console C#.Net Tutorial

Visual Studio.NET IDE

Define C#.NET

C# Comment

C# Variables

C# Data Types

C# Escape Sequence

C# Operators

Exercise-1

Format String

Operator Precedence

C# Keywords

Constant Variable

Type Conversion

Flow Control

Exercise Loops & Nested Loop

C# Arrays

C# Strings

User-Define Methods

Variable Scope

C# Enumerations

C# Structure

C# Exception Handling

Object Oriented Programming

C# Classes

Constructor & Destructor

C# Inheritance

C# Polymorphism

C# Operator Overloading

C# Method Overriding

C# Interface

Abstract Classes & Methods

Sealed Classes, Methods

C# Properties

C# Indexer

C# Delegates

C# Generics

C# Collection

System.Object

C#.Net Comments

A comment is not a C# code and is ignored by the compiler. In C#, comment is necessary when we are dealing with lengthy sections of code, it can be useful to add reminders about exactly what we are doing. Comment indicates the purpose of program so that others can also understand.

Types of comments:

  1. // - Single line comments are represented by double forward slashes.
  2. void main(){      
        //printf("I'm learning C Programming");
        //printf("I'm learning CPP Programming");
        //printf("I'm learning Java Programming");
        printf("I'm learning C#.Net Programming");
        getch();
    }
    I'm learning C#.Net Programming
  3. /* */ - Multi-line comment - use to comment a block of code i.e multiple statements.
  4. void main(){      
        /*printf("I'm learning C Programming");
        printf("I'm learning CPP Programming");
        printf("I'm learning Java Programming");*/
        printf("I'm learning C#.Net Programming");
        getch();
    }
    I'm learning C#.Net Programming
Updated: 11-Sept-19