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

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 on Loops and Nested Loop

C# Arrays

C# Strings

User-Define Methods

Variable Scope

C# Enumerations

C# Structure

C# Exception Handling

Object Oriented Programming

C# Classes

C# Constructor & Destructor

C# Inheritance

C# Polymorphism

C# Operator Overloading

C# Interface

Abstract Classes, Abstract Methods

Sealed Classes, Methods

C# Properties

C# Indexer

C# Delegates

C# Generics

C# Collection

System.Object

C# Variables

Variables are used to store values temporary entered by a user. Variables are the entity that may vary during program execution. In order to use a variable we have to declare with its data type.

Syntax: data_type variable_name;

Rules to declare a variable:
1. A variable name can contain any sequence of letters, digits and underscore.
2. Special characters, blank space or any comma are not allowed.
3. The first character should be a letter, an underscore or @.
4. Upper and lower case letters are distinguishable.
5. A Keyword cannot be used to declare a variable name.

Updated on: 03-Sep-2018