C# 7 ) C# CLASS AND OBJECT

                               *   CLASS  AND  OBJECT  *

  •  class is a collection of member and method.
  •  MEMBER :- all variable inside the class are members.
  •  METHOD :- all function is called method .
  •  Class keyword is used for class.

Q) Rules for  creating a class .

  •  all class before create to main class programme .

  class my  

    {     //  method

        public void display()

        {

            Console.WriteLine("sourabh");

        }

     }

  •        All class member or method access inside the main.
    all member and method access inside the main body using object.             

Q ) how to create object 

  •   Syntax :- classname objectname = new classname ( ) ;
  •   main class can't be count in class and object .     
  •  all object is to be create inside the main.
  •  inside the class all method is to be Private. 
Class and Object

 Ass input data from the user and check the following condition. 

Ass class input how to pass in a data



Comments

Popular posts from this blog

DATA CONTROL ( Gridview , Repeater , Formview , DataList , Detailsview , Listview )

Z 5 ) MVC (Model view Controller)

Z 8 ) MVC HTMLHELPER METHOD AND ACTIONLINK (how to use css ,atrributes,style in css)