Share via


ExtendedProperties.IndexOf Method

ExtendedProperties.IndexOf Method

Returns the index of a specific ExtendedProperty object within an ExtendedProperties collection, based on the globally unique identifier (GUID) for the ExtendedProperty object.

Definition

Visual Basic .NET Public Function IndexOf( _
ByVal id As Guid _
) As Integer
C# public int IndexOf(
Guid id
);
Managed C++ public: int* IndexOf(
Guid *id
);

Parameters

id System.Guid. The Guid of the ExtendedProperty object to check for.

Return Value

System.Int32. Returns the index of the ExtendedProperty object within an ExtendedProperties collection.

Remarks

If a Guid is passed in for an ExtendedProperty object that does not exist in the ExtendedProperties collection, this method returns -1.

Examples

[C#]

This C# example finds the index for a particular ExtendedProperty object that has a Guid assigned to the variable, theGuid, and that exists in a Stroke object, theStroke.

int theIndex = theStroke.ExtendedProperties.IndexOf(theGUID);
                

[VB.NET]

This Microsoft® Visual Basic® .NET example finds the index for a particular ExtendedProperty object that has a globally unique identifier (GUID) assigned to the variable, theGuid, and that exists in a Stroke object, theStroke.

Dim theIndex As Integer = theStroke.ExtendedProperties.IndexOf(theGUID)
                

See Also