class ExampleClass {
public void DoSomething()
{
if (this != null) {
//omitted
}
}
public void DoSomething2()
{
if (this != null) {
//omitted
}
}
}
Explanation: This can't be null in C# virtual instance methods - I was so confused by the widespread use of this check that I asked this question at SO: https://stackoverflow.com/questions/31747718/can-this-be-null-in-c-sharp-virtual-methods-what-happens-with-the-rest-of-ins