OOPS (class)
OOPS (0bject oriented programming language)
In object oriented programming we used class & object.
1.Class
- Class is a collection of member & Method.
- All Member representing a variable.
- All function representing a method.
2.Method(function, display)
Q. How to create a class
ans: class name
{
Member;
Method()
}
Rules for creating a class
1. Main class cannot be count in object oriented programming.
2. All class is to be create before the main class.
Q. How to access class
ans: Rules
1. All class is to be access with the help of object.
- Object is communication between class help of object.
All object is to be created inside the main body.
Syntax of object
Classname objectname =new classname();
NOTE;
By default all methods inside the class in private.
Parameter passing in class & object.
**Class and object in database
All class and object fundamental is used to handling the secure database programming
How to create a class
go to the solution explorer -> website-> add new item-> class
*All class file stored inside app code folder
*Class extension .cs
*All function is to be create inside the class(string)
Comments
Post a Comment