Given the following structure declared:
 
struct MyStruct 
{ 
      public int x; 
      public int y; 
}
 
Is the following code correct?
 
class MyClass : MyStruct
 {
 }
 
Explanation
No, it's impossible to inherit from a structure. All structures are implicitly sealed

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Cosmo
Sign Up Now
or Subscribe for future quizzes