Thursday , December 14 2017
Home / Dot Net / C# / Lesson 7: Class in C#

Lesson 7: Class in C#

Class in C#:

A class in c# is a group of related methods and variables. A class describes these things, and in most cases, you create an instance of this class, now referred to as an object. On this object, you use the defined methods and variables. A class is a construct that enables you to create your own custom types by grouping together variables of other types, methods and events. A class is like a blueprint. It defines the data and behavior of a type.

Class a blueprint for a data type. This does not actually define any data, but it does define what the class name means. That is, what an object of the class consists of and what operations can be performed on that object.

Syntax:

Access specifiers specify the access rules for the members as well as the class itself.

If not mentioned Access specifier, then the default access specifier for a class type is internal and Default access for the variables is private.

Exapmle:

Types of Classes in C#:

1.Partial Class

2.Abstract Class

3.Sealed Class

4.Static Class

Print Friendly, PDF & Email

Give us your valuable feedback

comments

About Murali

Hello everyone I am Software Developer having 3+ years of Experience in Microsoft Technologies and Others.

My skills :- Asp.net, C#,Ado.net, SQL SERVER, web services, windows Service,Windows applications,HTML,CSS,
JavaScript,JQuery,AnjularJs

Check Also

How to Send an Email In Perfect way Using C#

How to Send an Email In Perfect Way using C#: Now a days for every …

%d bloggers like this: