Class is a basic of oops concept.
Class is like a blue print of objects. In real world object has attributes,
like color, shape etc. and also have functionalities like walking, eating, etc.
Class contains both attribute and functionalities of a set of objects. For example
an employee class have name, salary, designation and department. If any person
that meets these requirements is the object of Employee class. A class enables
you to create your own custom type of objects using variables or field,
methods, constructor, events etc.
Class is reference type, it
means using functionality of class cam access through only objects. We can
define accessibility of using access specifiers. You can inherit one class to
In c# struct include a value
type entity is called as Struct. A structure also contains constructor,
constants, fields, methods, properties, indexers, operators, events and nested
types. Structure is a value type, it means it store on stack location.
A struct can be initialized
using with or without new keyword same as primitive variable or objects.