Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Generic conditional regions/methods #129350

Unanswered
Tyfyter asked this question in Ideas
Discussion options

It would be very helpful if certain members or certain parts of methods (but that's covered by discussion 6308) could be excluded based on generic constraints, for example:

public class Foo<T> {
	public void Bar(T value) where T : struct { ... }
	public void Bar(T value) where T : class { ... }
}
You must be logged in to vote

Replies: 1 comment

Comment options

This is overload by generic constraint, which is not supported in the CLR metadata system.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /