How to use the code null literals in C# ?

Posted by Vivek.Ramapuram under C# category on | Points: 40 | Views : 857
Null literal is null type. It means, it indicates that the reference points to no object.
 class program
public class pen
public int ink, cap;

static void Main()
pen p = null;

Console.WriteLine(p != null);
Console.WriteLine(p == null);

Comments or Responses

Login to post response