Top "Nullable" questions

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

Nullable ToString()

I see everywhere constructions like: int? myVar = null; string test = myVar.HasValue ? myVar.Value.ToString() : string.Empty; Why not use …

c# nullable
Performance surprise with "as" and nullable types

I'm just revising chapter 4 of C# in Depth which deals with nullable types, and I'm adding a section about using …

c# performance clr nullable unboxing
Cannot make @ManyToOne relationship nullable

I have a many-to-one relationship that I want to be nullable: @ManyToOne(optional = true) @JoinColumn(name = "customer_id", nullable = true) …

jpa-2.0 jboss7.x nullable postgresql-9.1 many-to-one
Serializing a Nullable<DateTime> in to XML

I am trying to serialize a class several of the data-members are Nullable objects, here is a example [XmlAttribute("AccountExpirationDate")] …

c# xml-serialization nullable
Passing null into a DataTable from a single line conditional statement parsing string values

I have an app that loops through a fixed width text file, reads each line into a string variable and …

c# .net datetime nullable system.data.datatable
Is there a way to use the default value on a non-optional parameter when null is passed?

For example, if I have the following data class: data class Data( val name: String = "", val number: Long = 0 ) And functions …

kotlin nullable default-parameters
Type Inference failed in a call to 'join' on nullable and non-nullable int

In my Linq, I am trying to make an inner join to a nullable field. Employee and Department have a …

c# linq entity-framework nullable non-nullable
How will a C# switch statement's default label handle a nullable enum?

How will a C# switch statement's default label handle a nullable enum? Will the default label catch nulls and any …

c# null switch-statement nullable
Are nullable types reference types?

When I declare an int as nullable int? i=null; Does i here become a reference type?

c# .net types nullable
Determine Oracle null == null

I wish to search a database table on a nullable column. Sometimes the value I'm search for is itself NULL. …

sql oracle null nullable