C#.Net Training

Posted on Updated on


C# is an object-oriented programming language. In Object-Oriented Programming methodology, a program consists of various objects that interact with each other by means of actions. The actions that an object may take are called methods. Objects of the same kind are said to have the same type or,more often, are said to be in the same class.

For example, let us consider a Rectangle object. It has attributes like length and width. Depending upon the design, it may need ways for accepting the values of these attributes, calculating area and display details.

Let us look at an implementation of a Rectangle class and discuss C# basic syntax, on the basis of our observations in it:




In C# there are four loops:

  1. For
  2. While
  3. Do while
  4. Foreach

1. The For loop:

It’s preferred when you know how many iterations you want, either because you know the exact amount of iterations, or because you have a variable containing the amount.
using System;


2.The While loop

The while loop simply executes a block of code as long as the condition you give it is true.


3. The do loop


A do while loop is helpful for viruses and for security level checking.

4. The foreach loop

A foreach loop operates on collections of items, for instance arrays or other built-in list types.


5. Switch case

The switch statement is a control statement that handles multiple selections by passing control to one of the case statements within its body.




For more details and queries please feel free to email, visit or call us. Wishing you the very best for all your future endeavors.
Helpline: 9814666333, 8699444666
Email: info@technocampus.co.in

Please fill the form and we shall contact you soon.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s