PropertyBagBase..::..Set<(Of <(<'T>)>)> Method (T, NotifyCollectionChangedEventHandler, String)

Set the indicated property to the value. If the value doesn't match the previous value, or if there is no previous value, raise a property changed notification.

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

Syntax


public bool Set<T>(
	T value,
	NotifyCollectionChangedEventHandler collectionChanged,
	string propertyName
)
where T : INotifyPropertyChanged, INotifyCollectionChanged
Public Function Set(Of T As {INotifyPropertyChanged, INotifyCollectionChanged}) ( _
	value As T, _
	collectionChanged As NotifyCollectionChangedEventHandler, _
	propertyName As String _
) As Boolean

Type Parameters

T

Parameters

value
Type: T
Value to be saved.
collectionChanged
Type: NotifyCollectionChangedEventHandler
A collection changed event handler to be attached to the new value. If an old value exists, the event handler will be removed from it.
propertyName
Type: String
Name of property to be created/updated

Return Value

Exceptions


ExceptionCondition
[ArgumentNullException] propertyName;propertyName is null or collectionChanged;collectionChanged is null.
[ArgumentException]propertyName is empty.;propertyName