Top "Nullable" questions

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

How to specify null prop type in ReactJS?

I've got a prop on a ReactJS Component that's either null or an Immutable Map. At the bottom of my …

javascript reactjs null nullable immutable.js
XmlSerializer and nullable attributes

I have a class with numerous Nullable<T> properties which I want to be serializable to XML as …

c# .net attributes nullable xmlserializer
How can I fix this up to do generic conversion to Nullable<T>?

I currently use this handy conversion extension method to do conversions between types: public static T To<T>(…

c# nullable
How to get nullable DateTime out of the database

My SQL Server database contains nullable DateTime values. How can I convert them to a nullable DateTime object in my …

c# sql-server datetime nullable sqldatareader
Conditional operator assignment with Nullable<value> types?

EmployeeNumber = string.IsNullOrEmpty(employeeNumberTextBox.Text) ? null : Convert.ToInt32(employeeNumberTextBox.Text), I often find myself wanting to do things like this (…

c# conditional-operator nullable
Nullable Enum nullable type question

I get the following compilation error with the following source code: Compilation Error: Type of conditional expression cannot be determined …

.net c#-2.0 nullable
@OneToOne(optional=false) and @JoinColumn(nullable=false) used together

I've bumped into this example in JPA 2.0 FR Specification, 11.1.37. OneToOne Annotation, page 403: @OneToOne(optional=false) @JoinColumn(name="CUSTREC_ID", unique=…

java annotations jpa-2.0 java-ee-6 nullable
Can I make an embedded Hibernate entity non-nullable?

What I want: @Embedded(nullable = false) private Direito direito; However, as you know there's no such attribute to @Embeddable. Is …

hibernate nullable embeddable
Is there a more elegant way to add nullable ints?

I need to add numerous variables of type nullable int. I used the null coalescing operator to get it down …

c# nullable null-coalescing-operator
When should one use nullable types in c#?

I have been repeatedly asked the following questions in many interviews.... But still can't explain them with a simple example... …

c# nullable