Vranvs
Vranvs

Reputation: 1531

Adding a new property in a C# interface after you've already implemented many classes

I have an interface with a few properties, with 10 or so classes that implement it.

Now I want to add a new property to the interface, but this breaks my 10 classes.

Is there a way to tell VS2019 to make auto-properties for all the classes?

Best.

Upvotes: 1

Views: 61

Answers (1)

Vranvs
Vranvs

Reputation: 1531

I just found it right now! enter image description here

When you ALT+Enter, there is an option to "Fix all occurrences in solution" - this will add a non-implemented method in the classes.

Upvotes: 2

Related Questions