5
C# Object Oriented Program

REPORT-C#

Embed Size (px)

DESCRIPTION

my report

Citation preview

Page 1: REPORT-C#

C# ObjectOrientedProgram

Page 2: REPORT-C#

C# OOP

OOP is what C# is all about It supports structs C# garbage collector is far more

sophisticated

Page 3: REPORT-C#

Structs:

are like lightweight versions of classes. They're not reference types; they're

value types, so when you pass them to methods, they're passed by value.

They're like classes in many ways—they support constructors, for example (but not inheritance). They take up fewer resources in memory, so when you've got a small, frequently used class, give some thought to using a struct instead.

Page 4: REPORT-C#

Garbage Collector:

Destructors are actually called by the C# garbage collector Destructor - declared much like

constructors, except that their name is prefaced with a tilda (~).

the garbage collector deletes objects no longer referenced in your code automatically (at a time of its choosing).