Class
Class defines the attributes and behavior used by all instance of class.
for ex
Class name : Car
Attributes [Properties] : Color, Speed
Behavior [Methods] : Accelerate, Turn and Brake
No memory is allocated when class is created.
Default access specifier for class is Private.
Class is a reference type, so when call the class by creating the object memory is allocated on the heap.
Object
An Object is an instance of class.
Object have individual copies of attributes and share a common set of behavior.
for ex
Class name : Car
Attributes [Properties] : Color, Speed
Behavior [Methods] : Accelerate, Turn and Brake
Object is creating using new keyword.
Dotnet, DotnetCore, Azure, C#,VB.net, Sql Server, WCF, MVC ,Linq, Javascript and Jquery
Subscribe to:
Post Comments (Atom)
Implementing OAuth validation in a Web API
I mplementing OAuth validation in a Web API Implementing OAuth validation in a Web API using C# typically involves several key steps to sec...
-
ViewBag, ViewData, TempData and View State in MVC ASP.NET MVC offers us three options ViewData, ViewBag and TempData for passing data from...
-
// Export Datatable to Excel in C# Windows application using System; using System.Data; using System.IO; using System.Windows.Forms; ...
No comments:
Post a Comment
Comments Welcome