﻿<?xml version="1.0" encoding="utf-8"?><Type Name="Nullable&lt;T&gt;" FullName="System.Nullable&lt;T&gt;"><TypeSignature Language="C#" Value="public struct Nullable&lt;T&gt; where T : struct" /><TypeSignature Language="ILAsm" Value=".class public sequential ansi serializable sealed beforefieldinit Nullable`1&lt;struct .ctor (class System.ValueType) T&gt; extends System.ValueType" /><AssemblyInfo><AssemblyName>mscorlib</AssemblyName><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><TypeParameters><TypeParameter Name="T"><Constraints><ParameterAttribute>DefaultConstructorConstraint</ParameterAttribute><ParameterAttribute>NotNullableValueTypeConstraint</ParameterAttribute><BaseTypeName>System.ValueType</BaseTypeName></Constraints></TypeParameter></TypeParameters><Base><BaseTypeName>System.ValueType</BaseTypeName></Base><Interfaces /><Attributes><Attribute><AttributeName>System.Diagnostics.DebuggerStepThrough</AttributeName></Attribute></Attributes><Docs><typeparam name="T">To be added.</typeparam><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>A type is said to be nullable if it can be assigned a value or can be assigned null, which means the type has no value whatsoever. By default, all reference types, such as <see cref="T:System.String" />, are nullable, but all value types, such as <see cref="T:System.Int32" />, are not. </para><para>In C# and Visual Basic, you mark a value type as nullable by using the ? notation after the value type. For example, int? in C# or Integer? in Visual Basic declares an integer value type that can be assigned null.</para><para>The <see cref="T:System.Nullable`1" /> structure supports using only a value type as a nullable type because reference types are nullable by design. </para><para>The <see cref="T:System.Nullable" /> class provides complementary support for the <see cref="T:System.Nullable`1" /> structure. The <see cref="T:System.Nullable" /> class supports obtaining the underlying type of a nullable type, and comparison and equality operations on pairs of nullable types whose underlying value type does not support generic comparison and equality operations.</para><format type="text/html"><h2>Fundamental Properties</h2></format><para>The two fundamental members of the <see cref="T:System.Nullable`1" /> structure are the <see cref="P:System.Nullable`1.HasValue" /> and <see cref="P:System.Nullable`1.Value" /> properties. If the <see cref="P:System.Nullable`1.HasValue" /> property for a <see cref="T:System.Nullable`1" /> object is true, the value of the object can be accessed with the <see cref="P:System.Nullable`1.Value" /> property. If the <see cref="P:System.Nullable`1.HasValue" /> property is false, the value of the object is undefined and an attempt to access the <see cref="P:System.Nullable`1.Value" /> property throws an <see cref="T:System.InvalidOperationException" />. </para><format type="text/html"><h2>Boxing and Unboxing</h2></format><para>When a nullable type is boxed, the common language runtime automatically boxes the underlying value of the <see cref="T:System.Nullable`1" /> object, not the <see cref="T:System.Nullable`1" /> object itself. That is, if the <see cref="P:System.Nullable`1.HasValue" /> property is true, the contents of the <see cref="P:System.Nullable`1.Value" /> property is boxed. When the underlying value of a nullable type is unboxed, the common language runtime creates a new <see cref="T:System.Nullable`1" /> structure initialized to the underlying value.</para><para>If the HasValue property of a nullable type is false, the result of a boxing operation is null. Consequently, if a boxed nullable type is passed to a method that expects an object argument, that method must be prepared to handle the case where the argument is null. When null is unboxed into a nullable type, the common language runtime creates a new <see cref="T:System.Nullable`1" /> structure and initializes its HasValue property to false.</para><format type="text/html"><h2>net_v451 and Windows Runtime Components</h2></format><para>Starting with the net_v451, you can include a <see cref="T:System.Nullable`1" /> type as a member of a structure exported in a WinMD library. Previously, this was not supported.  </para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Represents a value type that can be assigned null.</para></summary></Docs><Members><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public Nullable (T value);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(!T value) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Parameters><Parameter Name="value" Type="T" /></Parameters><Docs><param name="value">The initial value of the new instance.</param><summary><para>Constructs and initializes a new instance of       <see cref="T:System.Nullable&lt;T&gt;" /> giving it the specified initial value.</para></summary><remarks><para><block subset="none" type="note">Once this constructor has executed, applying <see cref="P:System.Nullable&lt;T&gt;.HasValue" />  to the new instance returns <see langword="true" />.</block></para></remarks><since version=".NET 2.0" /></Docs></Member><Member MemberName="Equals"><MemberSignature Language="C#" Value="public override bool Equals (object other);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance bool Equals(object other) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Boolean</ReturnType></ReturnValue><Parameters><Parameter Name="other" Type="System.Object" /></Parameters><Docs><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>If the <see cref="P:System.Nullable`1.HasValue" /> property of the current <see cref="T:System.Nullable`1" /> structure is true, equality is determined by passing the <paramref name="other" /> parameter to the Equals method of the underlying value of the current <see cref="T:System.Nullable`1" /> structure.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Indicates whether the current <see cref="T:System.Nullable`1" /> object is equal to a specified object.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>true if the <paramref name="other" /> parameter is equal to the current <see cref="T:System.Nullable`1" /> object; otherwise, false. </para><para>This table describes how equality is defined for the compared values: </para><list type="table"><listheader><item><term><para>Return Value</para></term><description><para>Description</para></description></item></listheader><item><term><para>true</para></term><description><para>The <see cref="P:System.Nullable`1.HasValue" /> property is false, and the <paramref name="other" /> parameter is null. That is, two null values are equal by definition.</para><para>-or-</para><para>The <see cref="P:System.Nullable`1.HasValue" /> property is true, and the value returned by the <see cref="P:System.Nullable`1.Value" /> property is equal to the <paramref name="other" /> parameter.</para></description></item><item><term><para>false</para></term><description><para>The <see cref="P:System.Nullable`1.HasValue" /> property for the current <see cref="T:System.Nullable`1" /> structure is true, and the <paramref name="other" /> parameter is null.</para><para>-or-</para><para>The <see cref="P:System.Nullable`1.HasValue" /> property for the current <see cref="T:System.Nullable`1" /> structure is false, and the <paramref name="other" /> parameter is not null.</para><para>-or-</para><para>The <see cref="P:System.Nullable`1.HasValue" /> property for the current <see cref="T:System.Nullable`1" /> structure is true, and the value returned by the <see cref="P:System.Nullable`1.Value" /> property is not equal to the <paramref name="other" /> parameter.</para></description></item></list></returns><param name="other"><attribution license="cc4" from="Microsoft" modified="false" />An object.</param></Docs></Member><Member MemberName="GetHashCode"><MemberSignature Language="C#" Value="public override int GetHashCode ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetHashCode() cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Int32</ReturnType></ReturnValue><Parameters /><Docs><remarks><para> The algorithm used to generate the hash code is unspecified. </para><para><block subset="none" type="note">This method
      overrides <see cref="M:System.Object.GetHashCode" />.</block></para></remarks><since version=".NET 2.0" /><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Retrieves the hash code of the object returned by the <see cref="P:System.Nullable`1.Value" /> property.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>The hash code of the object returned by the <see cref="P:System.Nullable`1.Value" /> property if the <see cref="P:System.Nullable`1.HasValue" /> property is true, or zero if the <see cref="P:System.Nullable`1.HasValue" /> property is false. </para></returns></Docs></Member><Member MemberName="GetValueOrDefault"><MemberSignature Language="C#" Value="public T GetValueOrDefault ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance !T GetValueOrDefault() cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>T</ReturnType></ReturnValue><Parameters /><Docs><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <see cref="Overload:System.Nullable`1.GetValueOrDefault" /> method returns a value even if the <see cref="P:System.Nullable`1.HasValue" /> property is false (unlike the <see cref="P:System.Nullable`1.Value" /> property, which throws an exception). </para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Retrieves the value of the current <see cref="T:System.Nullable`1" /> object, or the object's default value.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>The value of the <see cref="P:System.Nullable`1.Value" /> property if the  <see cref="P:System.Nullable`1.HasValue" /> property is true; otherwise, the default value of the current <see cref="T:System.Nullable`1" /> object. The type of the default value is the type argument of the current <see cref="T:System.Nullable`1" /> object, and the value of the default value consists solely of binary zeroes.</para></returns></Docs></Member><Member MemberName="GetValueOrDefault"><MemberSignature Language="C#" Value="public T GetValueOrDefault (T defaultValue);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance !T GetValueOrDefault(!T defaultValue) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>T</ReturnType></ReturnValue><Parameters><Parameter Name="defaultValue" Type="T" /></Parameters><Docs><param name="defaultValue">To be added.</param><summary><para>Returns the value of the current instance, or if it has none, returns <paramref name="alternateDefaultValue" />.</para></summary><returns><para>A value of type <see langword="T" />, which is either the value of the current instance, or if it has none, the value of <paramref name="alternateDefaultValue" />.</para></returns><remarks><para><block subset="none" type="note"><see cref="M:System.Nullable&lt;T&gt;.GetValueOrDefault" /><see langword="()" /> allows the default value for type <see langword="T" />  to be returned if the current instance contains no value.</block></para></remarks><since version=".NET 2.0" /></Docs></Member><Member MemberName="HasValue"><MemberSignature Language="C#" Value="public bool HasValue { get; }" /><MemberSignature Language="ILAsm" Value=".property instance bool HasValue" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Boolean</ReturnType></ReturnValue><Docs><value><para><see langword="true" /> if the current instance contains a value; otherwise <see langword="false" />.</para></value><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>If the <see cref="P:System.Nullable`1.HasValue" /> property is true, the value of the current <see cref="T:System.Nullable`1" /> object can be accessed with the <see cref="P:System.Nullable`1.Value" /> property. Otherwise, attempting to access its value throws an <see cref="T:System.InvalidOperationException" /> exception. </para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets a value indicating whether the current <see cref="T:System.Nullable`1" /> object has a valid value of its underlying type. </para></summary></Docs></Member><Member MemberName="op_Explicit"><MemberSignature Language="C#" Value="public static T op_Explicit (Nullable&lt;T&gt; value);" /><MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname !T op_Explicit(valuetype System.Nullable`1&lt;!T&gt; value) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>T</ReturnType></ReturnValue><Parameters><Parameter Name="value" Type="System.Nullable&lt;T&gt;" /></Parameters><Docs><param name="value">The <see cref="T:System.Nullable&lt;T&gt;" />  value to convert to type <see langword="T" />.</param><summary><para>Perform an explicit conversion of a    <see cref="T:System.Nullable&lt;T&gt;" />  value to type <see langword="T" />.</para></summary><returns>The value, if any, of the specified nullable value. Otherwise, a <see cref="T:System.InvalidOperationException" /> is thrown.</returns><remarks><para><block subset="none" type="note">The conversion implemented by this method corresponds exactly to obtaining the value of the <see cref="P:System.Nullable&lt;T&gt;.Value" /> property.</block></para></remarks><since version=".NET 2.0" /><exception cref="System.InvalidOperationException"><see cref="P:System.Nullable&lt;T&gt;.HasValue" /> is <see langword="false" />.</exception></Docs></Member><Member MemberName="op_Implicit"><MemberSignature Language="C#" Value="public static Nullable&lt;T&gt; op_Implicit (T value);" /><MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname valuetype System.Nullable`1&lt;!T&gt; op_Implicit(!T value) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Nullable&lt;T&gt;</ReturnType></ReturnValue><Parameters><Parameter Name="value" Type="T" /></Parameters><Docs><param name="value">The <see langword="T" />  value to convert to <see cref="T:System.Nullable&lt;T&gt;" />.</param><summary><para>Perform an implicit conversion of a    <see langword="T" />  value to   <see cref="T:System.Nullable&lt;T&gt;" />.</para></summary><returns><para>A <see cref="T:System.Nullable&lt;T&gt;" /> with the specified value.</para></returns><remarks><para><block subset="none" type="note">The conversion implemented by this method corresponds exactly to invoking the <see cref="M:System.Nullable&lt;T&gt;" /><see langword="(T)" /> constructor.</block></para></remarks><since version=".NET 2.0" /></Docs></Member><Member MemberName="ToString"><MemberSignature Language="C#" Value="public override string ToString ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance string ToString() cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.String</ReturnType></ReturnValue><Parameters /><Docs><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <see cref="M:System.Nullable`1.ToString" /> property returns the string yielded by calling the ToString property of the object returned by the <see cref="P:System.Nullable`1.Value" /> property. </para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Returns the text representation of the value of the current <see cref="T:System.Nullable`1" /> object.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>The text representation of the value of the current <see cref="T:System.Nullable`1" /> object if the <see cref="P:System.Nullable`1.HasValue" /> property is true, or an empty string ("") if the <see cref="P:System.Nullable`1.HasValue" /> property is false.</para></returns></Docs></Member><Member MemberName="Value"><MemberSignature Language="C#" Value="public T Value { get; }" /><MemberSignature Language="ILAsm" Value=".property instance !T Value" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>T</ReturnType></ReturnValue><Docs><value><para>The value of the current instance.</para></value><since version=".NET 2.0" /><exception cref="System.InvalidOperationException"><see cref="P:System.Nullable&lt;T&gt;.HasValue" /> is <see langword="false" />.</exception><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>If a value of type T has not been assigned to the <see cref="T:System.Nullable`1" /> object, you can compare it to null and retrieve its <see cref="P:System.Nullable`1.HasValue" /> property, but you cannot access its <see cref="P:System.Nullable`1.Value" /> property or call its other members. </para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets the value of the current <see cref="T:System.Nullable`1" /> object if it has been assigned a valid underlying value.</para></summary></Docs></Member></Members></Type>