NullableTypes Class Library

NullableString Structure

Represents a String that is either a variable-length stream of characters or Null.

For a list of all members of this type, see NullableString Members.

System.Object
   ValueType
      NullableString

[Visual Basic]
<Serializable>
<DefaultMember(MemberName="Chars")>
Public Structure NullableString
Implements INullable, IComparable, IXmlSerializable
[C#]
[Serializable]
[DefaultMember(MemberName="Chars")]
public struct NullableString : INullable, IComparable, IXmlSerializable

Remarks

A NullableString type can sound very strange because System.String is a Reference-Type and it can already be null (Nothing in Visual Basic). Anyway a NullableString parameter (or field or property) explicity states that a Null value is welcome: you wont get an ArgumentNullException passing Null to a NullableString method parameter (or field or property). Moreover NullableString permits to treat Null values for a String like for any other type of NullableTypes.

Requirements

Namespace: NullableTypes

Assembly: NullableTypes (in NullableTypes.dll)

See Also

NullableString Members | NullableTypes Namespace