Struct can be inherited or not?

 Posted by Rajni.Shekhar on 4/11/2012 | Category: C# Interview questions | Views: 2359 | Points: 40

No, Struct can not be inherited because it is sealed implicitly.


public struct struct1


public class class1 : struct1 //Error : 'class1': cannot derive from sealed type 'struct1'

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: Akiii on: 4/12/2012 | Points: 10
Good question....

Thanks and Regards

Login to post response