G
GlennDoten
I just happened to be looking through the implementation of the
System.Version class in the SSCLI and one of the constructors starts
like this:
public Version(String version) {
if ((Object) version == null)
throw new ArgumentNullException("version");
Does anyone have any ideas why the string parameter is being cast to an
object prior to checking for null? Is there some circumstance where not
having the explicit cast to object would cause the test for null to not
work as expected?
System.Version class in the SSCLI and one of the constructors starts
like this:
public Version(String version) {
if ((Object) version == null)
throw new ArgumentNullException("version");
Does anyone have any ideas why the string parameter is being cast to an
object prior to checking for null? Is there some circumstance where not
having the explicit cast to object would cause the test for null to not
work as expected?