Essential Solutions

Pages

  • Home
  • Who We Are
  • Our Services
  • Industry Updates
  • Tutorials

Monday, May 12, 2014

Console Output


Question: Please write out the output (what would be written to the console), when this following block of code is run:

                      object x = null;
                      if (x.Equals(null)) Console.WriteLine("null");
                      else Console.WriteLine("not null");
      
 
Answer: Unhandled Exception: System.NullReferenceException
Posted by Sonali Agarwal at 10:42 AM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: Console Output

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

About Me

Sonali Agarwal
View my complete profile

Blog Archive

  • ►  2016 (1)
    • ►  July (1)
  • ►  2015 (79)
    • ►  September (3)
    • ►  August (1)
    • ►  July (2)
    • ►  June (30)
    • ►  May (36)
    • ►  April (6)
    • ►  January (1)
  • ▼  2014 (16)
    • ►  October (3)
    • ▼  May (13)
      • Describe some of the pros and cons of ASP.NET MV...
      • When making calls to a DB from an application when...
      • Within a single IIS website is it possible to have...
      • What is the numeric IP Address for the localhost
      • What is the difference between executing a dynamic...
      • Console Output
      • What is the possible value range of a tinyint vari...
      • Console Output
      • Console Output
      • Console Output
      • Describe the difference between an Abstract Class ...
      • Describe the difference between a "Static" and "No...
      • Describe the difference between a Data Reader and ...
Simple theme. Theme images by mariusFM77. Powered by Blogger.