ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

What is the use of Partial Classes ?

user-image
تم إضافة السؤال من قبل Rajkumar Bolle
تاريخ النشر: 2014/01/02
Bowsil Ameen
من قبل 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

 

 

 

 

 

 

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟