How to store null value to int with C#

1 Answer

0 votes
using System;

class Program
{
    static void Main() {
        int? x = null;
        int? y = 98;

        Console.WriteLine(x);
        Console.WriteLine(y);
    }
}
 
  
  
/*
run:
  

98

*/

 



answered Dec 13, 2020 by avibootz

Related questions

1 answer 114 views
114 views asked Dec 13, 2020 by avibootz
1 answer 177 views
2 answers 233 views
1 answer 208 views
1 answer 112 views
112 views asked Apr 12, 2024 by avibootz
2 answers 250 views
...