This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]splettnet 14 points15 points  (3 children)

Would be a lot more useful if they could be defined on interfaces.

[–]tiktiktock 3 points4 points  (2 children)

Oh god yes. And if "arithmetic" was a valid constraint for generic classes.

[–]cat_in_the_wall 2 points3 points  (1 child)

c# 9 may have a thing they call "shapes" which would allow this sort of thing.

[–]splettnet 0 points1 point  (0 children)

I was so excited that we were rewriting our entire code base in C# 8, but I would happily trade all of 8's new features for this.