ExtendedProperties.GetEnumerator 메서드
업데이트: 2007년 11월
System.Collections.IEnumerator 인터페이스를 구현하고 ExtendedProperties 컬렉션 내의 ExtendedProperty 개체를 반복할 수 있는 개체를 반환합니다.
네임스페이스: Microsoft.Ink
어셈블리: Microsoft.Ink(Microsoft.Ink.dll)
구문
‘선언
Public Function GetEnumerator As ExtendedProperties..::.ExtendedPropertiesEnumerator
‘사용 방법
Dim instance As ExtendedProperties
Dim returnValue As ExtendedProperties..::.ExtendedPropertiesEnumerator
returnValue = instance.GetEnumerator()
public ExtendedProperties..::.ExtendedPropertiesEnumerator GetEnumerator()
public:
ExtendedProperties..::.ExtendedPropertiesEnumerator^ GetEnumerator()
public ExtendedProperties..::.ExtendedPropertiesEnumerator GetEnumerator()
public function GetEnumerator() : ExtendedProperties..::.ExtendedPropertiesEnumerator
반환 값
형식: Microsoft.Ink.ExtendedProperties.ExtendedPropertiesEnumerator
System.Collections.IEnumerator 인터페이스를 구현하고 ExtendedProperties 컬렉션 내의 ExtendedProperty 개체를 반복할 수 있는 개체를 반환합니다.
예제
다음 예제에서는 ExtendedProperties 컬렉션을 반복하면서 컬렉션의 각 ExtendedProperty 개체를 가져오는 두 가지 방법을 보여 줍니다. 다른 개체에도 적용 가능하지만 이 경우에는 Stroke.ExtendedProperties 속성에서 ExtendedProperties 컬렉션을 반환합니다.
이 예제에서는 ExtendedProperties 컬렉션의 System.Collections.IEnumerator를 가져와서 컬렉션의 각 항목을 열거하는 데 사용합니다.
Dim propList As ArrayList = New ArrayList()
Dim ienum As IEnumerator = stroke.ExtendedProperties.GetEnumerator()
ienum.Reset()
While ienum.MoveNext()
Dim prop As ExtendedProperty = DirectCast(ienum.Current, ExtendedProperty)
propList.Add(prop)
End While
ArrayList propList = new ArrayList();
IEnumerator ienum = stroke.ExtendedProperties.GetEnumerator();
ienum.Reset();
while (ienum.MoveNext())
{
ExtendedProperty prop = (ExtendedProperty)ienum.Current;
propList.Add(prop);
}
이 예제에서는 foreach 문을 사용합니다. 이 문은 내부 코드에서 컴파일러가 이를 지원하기 위해 생성하는 GetEnumerator 메서드를 호출합니다.
Dim propList As ArrayList = New ArrayList()
For Each prop As ExtendedProperty In stroke.ExtendedProperties
propList.Add(prop)
Next
ArrayList propList = new ArrayList();
foreach (ExtendedProperty prop in stroke.ExtendedProperties)
{
propList.Add(prop);
}
플랫폼
Windows Vista
.NET Framework 및 .NET Compact Framework에서 모든 플랫폼의 전체 버전을 지원하지는 않습니다. 지원되는 버전의 목록을 보려면 .NET Framework 시스템 요구 사항을 참조하십시오.
버전 정보
.NET Framework
3.0에서 지원