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

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

متابعة

Why the base class and derive class has to be STATIC while using Static keyword?

user-image
تم إضافة السؤال من قبل Ubaid sayeed Mohd abdul sayeed , Senior Programmer , Moksha solutions
تاريخ النشر: 2016/09/22
Igor Polischuk
من قبل Igor Polischuk , Software Engineer , EPAM

This question was very interesting for me and I've started investigation. I have never thought to use this approach. I mean to derive one static class from another. So, I found out that .NET Framework doesn't allow to derive one static class from another. The static class must be derived directly from System.Object.

Nimish Pankhania
من قبل Nimish Pankhania , Full Stack Developer .NET , Capita ITS

The keyword STATIC defines a singleton class therefore to derive from a static class the base class has to be the same type.

Bineesh VP
من قبل Bineesh VP , Software Developer , Unknown

There would be base class function like Public static virtual DoSomething()

This function is overrided in derived class like Public static Override DoSomething()

 

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