Blog

By Team Escalera on 31 Oct 2017 03:27 PM
  • interview questions
0 comments

We can use this code to Calculate Sum of All Elements in array
We can use FOREACH Loop for this task.

int[ ] arr = {13, 36, 63, 556, 990};
int sum = 0;

foreach (int a in arr) {
sum += a;
}

Console.WriteLine(sum);


//This Code Outputs :  “1658” Because 13 + 36 + 63 + 556 + 990...............



By Team Escalera on 31 Oct 2017 03:29 PM
  • Information
0 comments

Variables c sharp

A “variable” is created in C # programming to reserve a location in memory space to store values. Variable as the name suggests has dynamic values. A variable has a Name and a Data Type.
Data Type can be string, integer, double, float etc.
A Variable must be declared with its data type and then can be used in the program.

Variable are used to perform logical operations.

An Example of Variable Name is yourName


By Team Escalera on 31 Oct 2017 03:32 PM
  • learn C#
0 comments

Class Constructor Example C#

class Person
{
private int age;
private string name;
public Person(string pn)
{
name = pn;
}

public string printName()
{
return name;
}
}
static void Main(string[] args)
{
Person b= new Person(“Manish”);
Console.WriteLine(b.printName(...............