Tag: C# basics

C# String

A string literal is a set of characters enclosed by double quotes. It is a collection of char objects.

Posted in: C# Basics, C#.NET

C# Data Type Initialization

All data types can be used as: Syntax: data_type var_name = value; STATEMENT DESCRIPTION data_type Data type to be specified such as int, string, bool, char, double etc. var_name It is a name of a variable, this can be any valid name (e.g.: number, websiteName etc). = It is an assignment operator which is used […]

Posted in: C# Basics, C#.NET

C# Basic Program Structure

Example, a simple program structure: using System; namespace csharpBasic { // Start class definition / declaration. class Program { // Static main method void type declaration. static void Main(string[] args) { // An int type variable is declared and initialized. int studentRollNo = 78005; // Print variable. Console.WriteLine(studentRollNo); Console.ReadKey(); } // End of main method […]

Posted in: C# Basics, C#.NET

C# String Literals

A string literal is a set of characters or more than one character which is enclosed by double quotes.

Posted in: C# Basics, C#.NET

C# Regular String Escape Sequences

They are used for new lines, set double quotation, give white spaces, tabs etc in string literals. ESCAPE SEQUENCE DESCRIPTION \” Print string literals in double quotes. \’ Print string literals in single quotes. \a When you debug program, an alert or bell will be ringed. \n Print string literals at new line. \t Create […]

Posted in: C# Basics, C#.NET

C# Verbatim String Literal

It specifies with a @ symbol followed by double quotes (@””). By using it, we can write contents of multiple string lines and also can span more than one line. We can include new lines, tabs, double quotations etc in it without using escape sequences (describes as above). Notice, it displays our string literals as […]

Posted in: C# Basics, C#.NET

C# Variable Scopes

The scope of a variable is an area or region of code which indicates that where these variables is being accessed from that area or region. ┬áThere are 3 types of variable’s scope: Class level scope. Method level scope. for, while and do while loop, if and switch statements scope. Class level scope: When we […]

Posted in: C# Basics, C#.NET

C# Type Conversion Or Casting

When we assign one type of a variable to another type of variable that process is called type conversion.

Posted in: C# Basics, C#.NET
Have a natural attraction for women cosmetics and replica watches uk clothes, no
more than two for men the most attractive one, is to make their own driving experience, happy and can serve as the facade of the car, another is to highlight the taste edify sentiment rolex replica watch. The replica rolex is undoubtedly the most fashionable accessories, wear a suit to attend the activities, but also get a decent match on the replica watches .