Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

What is the use of Partial Classes ?

user-image
Question ajoutée par Rajkumar Bolle
Date de publication: 2014/01/02
Bowsil Ameen
par 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