Share via

New functionality in c# wanted

Ingmar Crone 51 Reputation points
2023-05-27T15:41:29.06+00:00

Hi everyone,

I know static classes are seen as dirty. I know the interface and abstract class need to be instantiated. I know.

Still I would love for there to be a "static interface" - an interface that you could put on a static class.
And I would also love a static abstract base class with static virtual methods that you can override in another static class.
This is because I find it very usefull to do all my inheritance on models, and then have static classes for specific logic.

These business classes are static because you can't instantiate them, and every method has to work only with it's parameters.

Right now, loosing inheritance is a big price to pay, but when all inheritance is already done, I experiance it as a very clean way of programming.
Could you please consider adding an static interface and a static abstract class to our language c#?

With kind regards,

Ingmar

Developer technologies | C#
Developer technologies | C#

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.

0 comments No comments

Answer accepted by question author

Karen Payne MVP 35,606 Reputation points Volunteer Moderator
2023-05-27T18:47:30.48+00:00

Will not doing and good to ask here, ask here Suggest a feature for Visual Studio

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.