GraphObject::SetValue<T> Method (GraphProperty^, T)

 

Sets the value of the given property. If the property already exists, its value is overwritten unless the annotation flags prevent otherwise.

Namespace:   Microsoft.VisualStudio.GraphModel
Assembly:  Microsoft.VisualStudio.GraphModel (in Microsoft.VisualStudio.GraphModel.dll)

public:
generic<typename T>
T SetValue(
	GraphProperty^ property,
	T value
)

Parameters

property
Type: Microsoft.VisualStudio.GraphModel::GraphProperty^

The property you want to set.

value
Type: T

The value of the property.

Return Value

Type: T

The value.

Type Parameters

T

The type of data being added.

Exception Condition
ArgumentNullException

Thrown if key is null.

InvalidOperationException

Thrown if the value's type cannot be assigned to the annotation.

-or-

Thrown if trying to write to a "write-once" annotation multiple times.

Return to top
Show: