Call by value and Call by reference in C#

By // 7 comments:
Parameter-we can pass two type of parameter to the method.
  1. Input parameter
  2. Out parameter
  • Input parameter- This kind of parameter is specify to give the same input to method   for calling it.
There  are two type of parameter 
  1.  Call by value
  2. Call by reference
3

Structure and Class in C#

By // 1 comment:
Structure is a user defined type which can contain different member (variable, method and property etc). 
Class is  a user define type which can contain such type of member but there is some difference between structure and class.
Now i am going to implement structure and class in C# after that i will show you exact difference between structure and class in C#.
There are some steps please follow them step by step which is given below.
3

Interface in C#

By // 2 comments:
There are some good features of Interface in C#. Which are given below.
  • Interface is the type which contain only declare member.It can not even single define member.
  • Interface can support multiple inheritance.
  • We can not specify any access specifier with interface member.
  •   In c#Interface can contains property definitions also.
  • We can not use Abstract keyword with Interface.
  • We can can not implement methods in interface.
  • We can not use constructor and destructor  with interface.
3

Indexer in c#

By // No comments:
Indexer is a new concept in c# language.This is very helpful when we want to use object as an array.If we want to use a class object like an array to set and get the values then we can create the Indexer within the class .
There are some feature of Indexer in c# language which is given below.
  • Indexer is written like property which will have get and set access-or .
  • Indexer access specifier can be Public ,private,internal,protected or protected Internal.
  • Return Type of Indexer is same as C# type.
  • Indexer takes at-least one parameter otherwise it gives compile time error. 
3

Properties In C#

By // 1 comment:
Hi Friends ! Here i am going to tell you what is Properties in c#. You can download this whole application from bottom after reading the Tutorials.
Properties  can be defined to Set and Get the values of private variables of a class.By using properties we can help proper hold over the variable uses.
Meaning of Set and Get access or:-
Set -> Write only not Read .
Get ->Read only not Write .
3

Abstract Class and Abstract Method in C#

By // No comments:
Abstract Class:- 
we use 'abstract' keyword to implement the concept of abstract class. 'Abstract class' can only inherited by other class.we can not create objects of 'abstract class' directly. When any  'abstract class' is inherited by other class then we create the objects of that derived class.We can not create objects of  'abstract class' because methods of  'abstract class' only declare but not define.
3

How to Use Multiple Main Method In C# Program

By // 4 comments:
We can use more than on Main Method in C# program, But there will only one Main Method which will act as entry point for the program.we can pass the value to the main method while running the program by specifying string array type parameter.
Example:-

3

Constructor and Destructor In C#

By // No comments:
We know that all objects that are created must be given initial values.we have used two approach to initialize the value of all the variables without constructors.
  1. The first approach uses the dot operator to access instance variables and then assigns values to them individually. It can be a tedious approach to initialize all the variables of all the objects.
  2. The second approach takes the help of a function like 'GetData' to initialize each object individually using statement like;    
        rect1.GetData(30,20);

3

Access Specifier or Modifier in C#

By // 10 comments:
Visibility Control:-  When we want to  implement inheritance, it is important to understand ,how to establish visibility levels for our classes and their members. There are four types of a accessibility modifiers which may be applied to classes and members to specify their level of visibility.
  1. Public
  2. private
  3. protected
  4. internal
3

Method Hiding in C#

By // 1 comment:
We can predefine the method of parent class in child class by implementing the concept of method hiding. In method hiding the base(parent) class method is predefined in child class by specify new keyword.
Example:-

3

Method Overriding in C#

By // 2 comments:
When one class inherit from another class ,all the member of parent class become the member of child class .If there is a method of parent class that we want to predefined in child class. we can implement the concept of method overriding ,it means a method overriding of parents class and child class can have same method name with same parameter but parent class method will have "VIRTUAL"Keyword and child class method have "OVERRIDE"Keyword.
3

Method Overloading in C#

By // 2 comments:
We can  used more than one Method with same name,within same class but with different parameter,that is called method overloading. When the basic functionality of more than one method is same but they are used different parameter,then we can implement method overloading.
Method overloading will be possible if method name is same but there signature is different.
3

OOPS Concepts in C# .net with real examples

By // 26 comments:
Object Oriented Programming language(OOPS):- It is a methodology to write the program where we specify the code in form of classes and objects.
    CLASS:-Class is a user defined data type. it is like a template. In c# variable are termed as instances of classes. which are the actual objects.
    EX:-
    Class classname
    {
      [variable declaration;]
      [Method declaration;]
    }
    3

    Partial Class In C#

    By // 1 comment:
    Partial Class:-
    we can break a large class code into small pieces by specifying more than one class with same but with partial keyword. In that case those same name classes will not be treated as different classes so when we will made the object of the class, we will get all the method and member for all same name class.
    • Open the Console Application From Microsoft Visual Studio.(File->New Project->Console Application ->Enter the Name of Application(ex-partial class)->Program.cs).
    3

    Arrays in C#

    By // 1 comment:
    An Array is a kind of variable which can hold multiple variable for same data type.Whenever we create an array then it is automatically inherit from System.Array class.
    This class defines a number of methods and properties that can be used to manipulate array more efficiently,which are given below:-
    Method/Property                                                  Meaning            
    Set value()                                            Sets the value for a given index in the array
    Reverse()                                              Reverse the contents of a one -dimension array
    sort()                                                      Sorts the elements in a one -dimensional array  
    Get Value()                                          Get the value for a given index in the array
    Get Length()                                       Gives the number of elements in a given dimension of the array
    Clear()                                                   Sets a range of elements to empty values
    Copy To()                                            Copies elements from the source array to the destination array
    Length()                                                Gives the Length of an array

    3

    Type Conversion in C#

    By // No comments:
    The Type Conversions is very important for any language.There is a need to convert a data of one type to another type.It is used to store a value of one type to value of another type.
    There are two type of conversion in C#.
    1. Implicit conversion
    2. Explicit conversion
    3

    Decision Making and Looping in c#

    By // No comments:
    Sometimes ,We have a number of situations where we may have to change the order of execution of statements based on certain conditions are met.This involves a kind of decision making to see whether a particular condition has occurred or not. and then to direct the computer   to execute certain statement accordingly.Every computer language must have features that instruct a computer to perform repetitive task.The process of repeatedly executing a block of statements is known as looping.
    There are some decision making statement statements in c#.
    1. if statement 
    2. Switch statement
    3. Conditional operator statement
    3

    Operators in C#

    By // No comments:
    An operator is a symbol that is used to perform certain Mathematical and logical Manipulations . An operator is basically used in programs to manipulate data and variables.
    There are some types of of operators that supports C# language.
    1. Arithmetic operators
    2. Logical operators
    3. Relational operators
    4. Assignment operators
    5. Conditional operators
    6. Bitwise operators
    7. Increment and Decrement operators
    8. Special operators
    3

    Variables and Data Types in C#

    By // No comments:
    A variable is an Identifier that denotes a storage location used to store a data value.Constants are unchanged during the execution of a program but a variable may take different values at different times during the execution of the program.Every variable has a type that that determines what values can be stored in the variable.
    A variable name can be chosen by the programmer in a meaningful way according to the program.
    Ex. 
        Length,Width,Height etc.
    There are some rules to chose variable name by the programmer.
    • Variable name should not be a keyword.
    • Variable name can not start with a digits.
    • Upper case and lower case are distinct.This means that the variable Height is not the same as height or HEIGHT.
    • White space is not allowed with variable Name.
    • Variable name can be any length.
    3

    Tokens in C#

    By // 3 comments:
    A C# program is a collection of classes.A class is defined by a set of object ,variable and methods.A c# program is basically collection of tokens.
    There are five tokens in C#.
    1. Keywords
    2. Identifiers
    3. Literals
    4. operators
    5. punctuators.
    3
    Powered by Blogger.