I've seen this code sample question in a exam and it works perfectly.
namespace Trials_1 { class Program { static void Main(string[] args) { int? a = 9; Console.Write("{0}", a); } } } But the below code throws an error CS0266.
namespace Trials_1 { class Program { static void Main(string[] args) { int? a = 9; int b = a; Console.Write("{0},{1}", a, b); } } } Can somebody explain me in detail?