What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 23361 |  Welcome, Guest!   Register  Login
 Home > Interview Questions > C# Interview Questions > Struct can be inherited or not? ... ...

Struct can be inherited or not?

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


Answer:

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

Example:

public struct struct1

{
}

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

Asked In: Many Interviews | Alert Moderator 
Found interesting? Add this to:


 Responses

Posted by: Akiii | Posted on: 12 Apr 2012 01:49:26 AM | Points: 10 | Alert Moderator 

Good question....


Thanks and Regards
Akiii

>> Write Response - Respond to this post and get points

Even more ... | Submit Interview Questions and win prizes!

More Interview Questions from Rajni.Shekhar

Even more ... | Submit Interview Questions and win prizes!


About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/22/2013 3:02:54 PM