Accessing Arrays Value

Posted in C#Tagged , ,

After storing values into the array, you need to retrieve the values from array and mandatory some operation on value. As storing value in array is very easy, the retrieving value from array is also so easy. You can retrieving array’s value by its index position. Each index position in array refers to a memory address in which….

C# Storing Value In Array

Posted in C#Tagged , ,

After announcement of array, you required to store value in array. In array you can store value at compile time by writing in the program or run time by taking input from the user. In this chapter, we will learn how to store value in array using c#. Storing value directly in your C# program: In your….

Initialization And Declaration Of Array In C#

Occasionally, you need to declare multiple variable of same data type. It is complex and time taking process. Just for an example, you have to declare 100 double type of variable then what would you do? Will you declare variable as like: double num1,num2,num3,num4,num5,num6,num7,num8…. num100; It is not a good  way to declare multiple variable of same data….

C# Array

Posted in C#Tagged ,

Array is a collection of variable of same data type. If you have declare 1000 long variable, then you can declare an long type array of 1000 size. The value of array can be access using index position of array. The first index position of array is zero. In C#,  two types of array: Single Dimensional Array and….

C# Command Line Argument

Posted in C#Tagged ,

We all understand, that we can pass parameter to a function as argument but what about Main(string[] args) method? Do parameters can be passed to Main() method in C#? Yes, parameter(s) can be passed to a Main() method in C# and it is called command line argument. Main() method is where program stars execution. Main….

C# Out Parameter

C# out parameter is like type of parameter that is declared with using out keyword. It is the like as reference parameter, that doesn’t create memory allocation. Usually, a method returns value with using return keyword. Unfortunately, a return modifier can return only one value at a time. Sometime, your C# program required to return multiple values from….

C# Reference Type Variable

Posted in C#Tagged , , ,

In this article i am explaining about reference type variable in C#. The Reference type variable is type of variable in C# that maintain the reference of memory address instead of value. class, interface, delegate, array is reference type. When you create object of any class with new keyword, a space is created in the managed heap….

Value Type Parameter In C#

Posted in C#Tagged , ,

In this article i am explaining about parameter in C#. As mentioned previous chapter, there are two types of parameter that can be use in function. First  is Value type parameter and second is reference type parameter. Before understanding both type of parameter in C#, you will have to understand Value type and Reference type. In two….

C# Static Method And Variables

Posted in C#Tagged , ,

In this article i am explaining what is static method and variable. When you create a function or declare a variable, it doesn’t create instance in a memory until you create object of class. But if you declare any function or variable with static modifier, it directly create instance in a memory and acts globally. The….

Calling Method Or Function (C#)

In this article i am explaining how to call method in C#.After creating function, you need to call it in Main() method to execute programe. In order to call method, you need to create object of  class, then followed bydot(.) operator you can call the method. If method is static, then there is no need….