GraphObject.SetValue Method

Definition

Overloads

SetValue(String, Object)

Add an annotation using the given key, type and value

SetValue<T>(GraphProperty, T)

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

SetValue(String, Object)

Add an annotation using the given key, type and value

C++
public:
 System::Object ^ SetValue(System::String ^ propertyId, System::Object ^ value);

Parameters

propertyId
String

The property to set

value
Object

The value to set

Returns

Applies to

Visual Studio SDK 2022 and other versions
Product Versions
Visual Studio SDK 2017, 2019, 2022

SetValue<T>(GraphProperty, T)

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

C++
public:
generic <typename T>
 T SetValue(Microsoft::VisualStudio::GraphModel::GraphProperty ^ property, T value);

Type Parameters

T

The type of data being added

Parameters

property
GraphProperty

The property you want to set

value
T

Value of the property

Returns

T

The value

Exceptions

thrown if key is null

throws if trying to write to a "write once" annotation multiple times

Applies to

Visual Studio SDK 2022 and other versions
Product Versions
Visual Studio SDK 2017, 2019, 2022