Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Extend No-Constructor class

In C#, is it possible to extend a class that has no constructors?

Maybe I'm thinking about this incorrectly and just need a kick in the crotch. I have a Silverlight class that extends System.Windows.Media.Transform, With the official release of Silverlight 2, Transform now has no constructor. So, when I compile my class, I get an error saying that 'The type '...Transform' has no constructors defined.'

Is it still possible to extend this class in a useful way? If not, I'm going to be drawing an awful lot of sad faces.

like image 466
MojoFilter Avatar asked Jan 25 '23 01:01

MojoFilter


1 Answers

The sole constructor to Transform is internal, so you can't derive from it yourself.

like image 122
Jon Skeet Avatar answered Jan 31 '23 20:01

Jon Skeet