PropertyBagBase..::..GetNew<(Of <(<'T>)>)> Method (String)

Fetches a value, creating it if it doesn't exist.

Namespace:  Tortuga.Anchor.Modeling.Internals
Assembly:  Tortuga.Anchor (in Tortuga.Anchor.dll)

Syntax


public T GetNew<T>(
	string propertyName
)
Public Function GetNew(Of T) ( _
	propertyName As String _
) As T

Type Parameters

T
Expected type that has a parameterless constructor

Parameters

propertyName
Type: String
Case-sensitive property name

Return Value

Exceptions


ExceptionCondition
[ArgumentNullException]propertyName;propertyName is null
[ArgumentException]propertyName is empty;propertyName
[InvalidOperationException]Property + propertyName + contains a null

Remarks


Executing the constructor will trigger validation but not a property-changed event.