共用方式為


AudienceCollection.AudienceEnumerator Class

Represents the enumerator for Audience objects in the AudienceCollection object.

Inheritance Hierarchy

System.Object
  Microsoft.Office.Server.Audience.AudienceCollection.AudienceEnumerator

Namespace:  Microsoft.Office.Server.Audience
Assembly:  Microsoft.Office.Server.UserProfiles (in Microsoft.Office.Server.UserProfiles.dll)

Syntax

'Declaration
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
Public Class AudienceEnumerator _
    Implements IEnumerator
'Usage
Dim instance As AudienceCollection.AudienceEnumerator
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
public class AudienceEnumerator : IEnumerator

Remarks

An enumerator remains valid as long as the collection remains unchanged. If changes are made to the collection, such as adding, modifying, or deleting elements, the enumerator is irrecoverably invalidated, and the next call to MoveNext or Reset throws an InvalidOperationException. If the collection is modified between MoveNext and Current, Current returns the element to which it is set, even if the enumerator is already invalidated.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

AudienceCollection.AudienceEnumerator Members

Microsoft.Office.Server.Audience Namespace