Can call static method with null reference

w0rp devw0rp at gmail.com
Thu Jun 20 12:17:48 PDT 2013


You are invoking a function effectively stored statically in a 
class namespace. So you never actually dereference the null 
reference. You're just calling a function that doesn't really 
have anything to do with the reference. I prefer to tell it like 
it is and call the static method with the class name, so in this 
case that would be Foo.test1.


More information about the Digitalmars-d-learn mailing list