I'm interesting in some design choices of C# language.
There is a rule in C# spec that allows to use method groups as the expressions of is
operator:
class Foo {
static void Main() { if (Main is Foo) Main(); }
}
Condition above is always false, as the specification says:
7.10.10 The is operator
• If E is a method group or the null literal, of if the type of E is a reference type or a nullable type and the value of E is null, the result is false.
My questions: what is the purpose/point/reason of allowing to use the C# language element with no runtime representation in CLR like method groups inside the such "runtime" operator like is
?