What are nullable types

Posted by Jameschowdare under ASP.NET on 5/13/2009 | Views : 1177 | Status : [Member] | Replies : 1
What are nullable types


Posted by: Vuyiswamb on: 5/13/2009 [Member] [MVP] [Administrator] NotApplicable

Good Afternoon Jameschowdare

Nullable types are instances of the System..::.Nullable<(Of <(T>)>) struct. A nullable type can represent the correct range of values for its underlying value type, plus an additional null value. For example, a Nullable<Int32>, pronounced "Nullable of Int32," can be assigned any value from -2147483648 to 2147483647, or it can be assigned the null value. A Nullable<bool> can be assigned the values true false, or null. The ability to assign null to numeric and Boolean types is especially useful when you are dealing with databases and other data types that contain elements that may not be assigned a value. For example, a Boolean field in a database can store the values true or false, or it may be undefined.

Thank you for posting in Dotnetfunda

Vuyiswa Maseko

Thank you for posting at Dotnetfunda

Jameschowdare, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response