Virtual Generic Method Bug? #6327
-
This seems like a bug to me. Shouldn't this compile?
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
No. This does, though: #nullable enable
public class Foo1 : Foo {
protected override T? Serialization_Remove<T>(string Value) where T : default { // Note the new where clause here
return base.Serialization_Remove<T>(Value);
}
}
public class Foo {
protected virtual T? Serialization_Remove<T>(string Value) {
return default;
}
} From the docs:
|
Beta Was this translation helpful? Give feedback.
-
@333fred - When I'm coding in VS and I go into an empty |
Beta Was this translation helpful? Give feedback.
No. This does, though:
From the docs: