Why does null check fail even though object is explicitly initialized as null
问题 I have created a custom abstract class, which in turn of course derived classes were also created. public abstract class AbstractBaseClass ... public class ChildClass1 : AbstractBaseClass ... Now, whenever I declare for example AbstractBaseClass baseClass = null , and wherever null checks follow after this initialization, it always fails. if (baseClass == null) { // this block is never reached - condition always evaluates to false // let's say AbstractBaseClass baseClass = null is at line 10