Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

What is the use of Partial Classes ?

user-image
Question added by Rajkumar Bolle
Date Posted: 2014/01/02
Bowsil Ameen
by Bowsil Ameen , Sharepoint Development officer / architect , Etihad Airways

Dear Raj,

This is one of the cocept in OOPS that we can physically separate a class into multiple files

We have to use same class name but make sure you have partial class modifier( OR Else you will get error)

 

partial class SameClassName

{

public static void A1()

{

Console.WriteLine("A1");

}

}

partial class SameClassName

{

public static void A2()

{

Console.WriteLine("A2");

}

}

 

You can call the method like this

sameclassName.A1();

sameclassName.A2();

Cheers Ameen.S

 

 

 

 

 

 

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.