Hi Umair, I don't think Example 1 might result in Null Reference Exception as 'int' is value type and has some value when you create it. On the other hand if you use a variable of reference type without assigning a reference to it might result in Null Reference Exception
Hi Umair,
ReplyDeleteI don't think Example 1 might result in Null Reference Exception as 'int' is value type and has some value when you create it. On the other hand if you use a variable of reference type without assigning a reference to it might result in Null Reference Exception
Thanks,
Abdullah Atta
Ya agreed good point out , well i just want to clarify that if we use unassign object then it will result for null exception . Good Eye :-)
ReplyDelete