r/programminghelp • u/Logical_Ideal • Dec 23 '21
C# Why this code gives CS8600 problem
C# Example:
String name;
name = Console.ReadLine();
Console.WriteLine(name);
This problem only occurs in ReadLine....why?
6
Upvotes
r/programminghelp • u/Logical_Ideal • Dec 23 '21
C# Example:
String name;
name = Console.ReadLine();
Console.WriteLine(name);
This problem only occurs in ReadLine....why?
1
u/Logical_Ideal Dec 23 '21 edited Dec 23 '21
it continues to give the problem in Visual Studio, But if i test for example on onecompiler site and put the same code it works but not on visual....why does this happen?
Edit the problem/warning is: CS8600 "Converting null literal or possible null value to non-nullable type".