You are on page 1of 6

Programming C# 2.0, 3.0, 4.

Muhammed Ali Sakhi


Microsoft Certified Trainer

© PakDev.net
Agenda
Partial Classes
Partial Methods

© PakDev.net
Partial Classes
New in C# 2.0
When working on large projects
When working with automatically generated
source code

Indicated by a partial keyword


Should be in same namespace
Access modifiers should be same

© PakDev.net
Partial Methods
New in C# 3.0
Partial Classes or Partial Structs can have Partial
methods

Must begin with partial keywords


Must return void
They are implicitly private, and can’t be virtual

© PakDev.net
Partial Classes and Methods

Demo

© PakDev.net
Thank you
PakDev.net

© PakDev.net

You might also like