0

New property in C# class

How to add a new property to an existing class?

30th May 2020, 4:15 PM
DaSh
DaSh - avatar
3 Answers
+ 1
Sorry, almost forgotten to answer. If a class is sealed, it is restricted not to be implemented - usually for good reasons. If you have no else option, you can only copy it.
3rd Jun 2020, 1:48 AM
Sandra Meyer
Sandra Meyer - avatar
0
Since you've already finished some courses, I guess you do not mean your own class but a third party-class? Then I'd simply implement it 😉 (drive a child class from it and use this instead - there you can add whatever you want).
31st May 2020, 1:22 AM
Sandra Meyer
Sandra Meyer - avatar
0
Sandra Meyer Thanks, it helped:) but what should I do if class is sealed?🙃
31st May 2020, 5:22 PM
DaSh
DaSh - avatar