Partilhar via


Source.SetUserData(Guid, Object) Method

Definition

Sets the given user data property to the given value.

public:
 void SetUserData(Guid % key, System::Object ^ data);
public void SetUserData (ref Guid key, object data);
member this.SetUserData : Guid * obj -> unit
Public Sub SetUserData (ByRef key As Guid, data As Object)

Parameters

key
Guid

The GUID of the user data property to set the value for.

data
Object

An object representing the value to set.

Remarks

This method obtains the IVsUserData interface from the IVsTextLines object (which was passed to the Source class constructor), and then calls the SetData method with the given GUID and value.

See the GetUserData method for the GUIDs that are supported.

Applies to