My code works properly but every time when i run the code I have warning which I can not understand. I run the code in my linux terminal it says: Converting null literal or possible null value to non-nullable type Is it normal? Or should I do something? Here is my code:
namespace test2;
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Choose option: \n1. +\n2. -\n3. *\n4. /");
int num = Convert.ToInt32(Console.ReadLine());
string ext = Console.ReadLine();
if(num == 1){
while(true){
Console.WriteLine("Enter numbers or tap Q to exit:");
int x = Convert.ToInt32(Console.ReadLine());
int y = Convert.ToInt32(Console.ReadLine());
int z = x + y;
Console.WriteLine("{0}+{1}={2}", x,y,z);
if(ext =="Q"){
break;
}
}
}
}
}
I tried to write ext inside while loop but I can't