共用方式為


SqlSmoObject.GetPropValueOptional Method

Definition

Overloads

GetPropValueOptional(String)

Retrieve the property value from : - The property bag if the state is creating or we're in Design Mode (possible NULL value) - A call to our OnPropertyMissing method otherwise (will throw exception if value is NULL)

GetPropValueOptional<T>(String, T)

Returns the value of the named property. If the object is in the Creating state and the property has not yet been set the defaultValue is returned. If the object exists the defaultValue is ignored and the actual value is returned.

GetPropValueOptional(String)

Retrieve the property value from : - The property bag if the state is creating or we're in Design Mode (possible NULL value) - A call to our OnPropertyMissing method otherwise (will throw exception if value is NULL)

protected internal object GetPropValueOptional (string propName);
member this.GetPropValueOptional : string -> obj
Protected Friend Function GetPropValueOptional (propName As String) As Object

Parameters

propName
String

Returns

Applies to

GetPropValueOptional<T>(String, T)

Returns the value of the named property. If the object is in the Creating state and the property has not yet been set the defaultValue is returned. If the object exists the defaultValue is ignored and the actual value is returned.

public T GetPropValueOptional<T> (string propName, T defaultValue);
member this.GetPropValueOptional : string * 'T -> 'T
Public Function GetPropValueOptional(Of T) (propName As String, defaultValue As T) As T

Type Parameters

T

Parameters

propName
String
defaultValue
T

Returns

T

Applies to