0

Reason for value cannot be null in c#

I'm running application successfully some time before unfortunately I'm getting error in my program.cs shows value cannot null

12th Jul 2018, 6:15 AM
Vijaya Priya Viji
Vijaya Priya Viji - avatar
5 odpowiedzi
+ 6
Because, well, the value cannot be null. Can't tell much without your code. Post it, maybe?
12th Jul 2018, 6:18 AM
Hatsy Rei
Hatsy Rei - avatar
+ 2
most variable types cannot by default hold a null value. if you need them to, you can add a question mark at the end of the type definition like so: int? a = null;
12th Jul 2018, 6:18 AM
hinanawi
hinanawi - avatar
12th Jul 2018, 6:26 AM
hinanawi
hinanawi - avatar
0
shall I share my code here
12th Jul 2018, 6:25 AM
Vijaya Priya Viji
Vijaya Priya Viji - avatar
0
have you seen this
12th Jul 2018, 8:19 AM
Vijaya Priya Viji
Vijaya Priya Viji - avatar