Top "Nullable" questions

The nullable tag is for issues relating to nullable members or types.

Nullable property to entity field, Entity Framework through Code First

Using the data annotation Required like so: [Required] public int somefield {get; set;} Will set somefield to Not Null in …

entity-framework asp.net-mvc-3 code-first nullable
The type 'string' must be a non-nullable type in order to use it as parameter T in the generic type or method 'System.Nullable<T>'

Why do I get Error "The type 'string' must be a non-nullable value type in order to use it as …

c# nullable
C# nullable string error

private string? typeOfContract { get { return (string?)ViewState["typeOfContract"]; } set { ViewState["typeOfContract"] = value; } } Later in the code I use it like …

c# nullable
Best way to check for nullable bool in a condition expression (if ...)

I was wondering what was the most clean and understandable syntax for doing condition checks on nullable bools. Is the …

c# coding-style nullable
c# why can't a nullable int be assigned null as a value

Explain why a nullable int can't be assigned the value of null e.g int? accom = (accomStr == "noval" ? null : Convert.…

c# nullable
Can't find @Nullable inside javax.annotation.*

I want use @Nullable annotation to eliminate NullPointerExceptions. I found some tutorials on the net, I noticed that this annotation …

java annotations nullpointerexception nullable null-pointer
How to change a PG column to NULLABLE TRUE?

How can I accomplish this using Postgres? I've tried the code below but it doesn't work: ALTER TABLE mytable ALTER …

sql postgresql nullable
Convert nullable bool? to bool

How do you convert a nullable bool? to bool in C#? I have tried x.Value or x.HasValue ...

c# nullable
How to set null to a GUID property

I have an object of type Employee which has a Guid property. I know if I want to set to …

c# guid nullable
What's the difference between 'int?' and 'int' in C#?

I am 90% sure I saw this answer on stackoverflow before, in fact I had never seen the "int?" syntax before …

c# syntax types nullable