ExtendedProperties.GetEnumerator Method
Returns an object that implements the System.Collections.IEnumerator interface that can iterate through the ExtendedProperty objects within the ExtendedProperties collection.
Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in microsoft.ink.dll)
Syntax
'Declaration
Public Function GetEnumerator As ExtendedPropertiesEnumerator
'Usage
Dim instance As ExtendedProperties
Dim returnValue As ExtendedPropertiesEnumerator
returnValue = instance.GetEnumerator
public ExtendedPropertiesEnumerator GetEnumerator ()
public:
ExtendedPropertiesEnumerator^ GetEnumerator ()
public ExtendedPropertiesEnumerator GetEnumerator ()
public function GetEnumerator () : ExtendedPropertiesEnumerator
Not applicable.
Return Value
Returns an object that implements the System.Collections.IEnumerator interface that can iterate through the ExtendedProperty objects within the ExtendedProperties collection.
Example
These C# examples show two ways to iterate over the ExtendedProperties collection and get the name for each ExtendedProperty object in the Stroke object, theStroke
. The ExtendedProperties collection is returned by the Stroke.ExtendedProperties property.
This C# example gets the System.Collections.IEnumerator for the ExtendedProperties collection.
// Version using GetEnumerator()
ArrayList properties = new ArrayList();
IEnumerator ienum = theStroke.ExtendedProperties.GetEnumerator();
while (ienum.MoveNext())
{
ExtendedProperty property = (ExtendedProperty) ienum.Current;
properties.Add(property);
}
This C# example uses the foreach statement, which calls the GetEnumerator method in internal code that the compiler generates to support the statement.
ArrayList properties = new ArrayList();
// Version using foreach
foreach (ExtendedProperty property in theStroke.ExtendedProperties)
{
properties.Add(property);
}
These Microsoft® Visual Basic® .NET examples show two ways to iterate over the ExtendedProperties collection and get the name for each ExtendedProperty object in the Stroke object, theStroke
. The ExtendedProperties collection is returned by the Stroke.ExtendedProperties property.
This Microsoft® Visual Basic® .NET example gets the System.Collections.IEnumerator for the ExtendedProperties collection.
'Version using GetEnumerator()
Dim properties As New ArrayList()
Dim theExtendedProperty As ExtendedProperty
Dim ienum As IEnumerator = theStroke.ExtendedProperties.GetEnumerator()
While (ienum.MoveNext())
theExtendedProperty = ienum.Current
properties.Add(theExtendedProperty)
End While
This Microsoft® Visual Basic® .NET example uses the foreach statement, which calls the GetEnumerator method in internal code that the compiler generates to support the statement.
'Version using For Each
Dim properties As New ArrayList()
Dim theExtendedProperty As ExtendedProperty
For Each theExtendedProperty In theStroke.ExtendedProperties
properties.Add(theExtendedProperty)
Next
Platforms
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.
Version Information
.NET Framework
Supported in: 3.0
See Also
Reference
ExtendedProperties Class
ExtendedProperties Members
Microsoft.Ink Namespace
ExtendedProperty
Stroke.ExtendedProperties