Advertisement
kuruku

AssignNullValue

Apr 16th, 2014
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.41 KB | None | 0 0
  1. using System;
  2.  
  3. //Create a program that assigns null values to an integer and to a double variable. Try to print these variables at the console.
  4. //Try to add some number or the null literal to these variables and print the result.
  5.  
  6. class AssignNullValue
  7. {
  8.     static void Main()
  9.     {
  10.         int? a = null; ;
  11.         Console.WriteLine(a);
  12.         double? b = null; ;
  13.         Console.WriteLine(b);
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement