Table of Contents

Class GroupMemberCollection

Namespace
Microsoft.Exchange.WebServices.Data
Assembly
Microsoft.Exchange.WebServices.dll

Represents a collection of members of GroupMember type.

public sealed class GroupMemberCollection : ComplexPropertyCollection<GroupMember>, IEnumerable<GroupMember>, IEnumerable
Inheritance
GroupMemberCollection
Implements
Inherited Members

Constructors

GroupMemberCollection()

Initializes a new instance of the GroupMemberCollection class.

public GroupMemberCollection()

Methods

Add(GroupMember)

Adds a member to the collection.

public void Add(GroupMember member)

Parameters

member GroupMember

The member to add.

AddContactEmailAddress(Contact, EmailAddressKey)

Adds a member that is linked to a specific e-mail address of a contact.

public void AddContactEmailAddress(Contact contact, EmailAddressKey emailAddressKey)

Parameters

contact Contact

The contact to link to.

emailAddressKey EmailAddressKey

The contact's e-mail address to link to.

AddContactGroup(ItemId)

Adds a member linked to a Contact Group.

public void AddContactGroup(ItemId contactGroupId)

Parameters

contactGroupId ItemId

The Id of the contact group.

AddDirectoryContact(string)

Adds a member linked to an Active Directory contact.

public void AddDirectoryContact(string smtpAddress)

Parameters

smtpAddress string

The SMTP address of the Active Directory contact.

AddDirectoryContact(string, string)

Adds a member linked to an Active Directory contact.

public void AddDirectoryContact(string address, string routingType)

Parameters

address string

The address of the Active Directory contact.

routingType string

The routing type of the address.

AddDirectoryPublicFolder(string)

Adds a member linked to a mail-enabled Public Folder.

public void AddDirectoryPublicFolder(string smtpAddress)

Parameters

smtpAddress string

The SMTP address of the mail-enabled Public Folder.

AddDirectoryUser(string)

Adds a member linked to an Active Directory user.

public void AddDirectoryUser(string smtpAddress)

Parameters

smtpAddress string

The SMTP address of the member.

AddDirectoryUser(string, string)

Adds a member linked to an Active Directory user.

public void AddDirectoryUser(string address, string routingType)

Parameters

address string

The address of the member.

routingType string

The routing type of the address.

AddOneOff(string, string)

Adds a one-off member.

public void AddOneOff(string displayName, string smtpAddress)

Parameters

displayName string

The display name of the member.

smtpAddress string

The SMTP address of the member.

AddOneOff(string, string, string)

Adds a one-off member.

public void AddOneOff(string displayName, string address, string routingType)

Parameters

displayName string

The display name of the member.

address string

The address of the member.

routingType string

The routing type of the address.

AddPersonalContact(ItemId)

Adds a member linked to a contact's first available e-mail address.

public void AddPersonalContact(ItemId contactId)

Parameters

contactId ItemId

The Id of the contact.

AddPersonalContact(ItemId, string)

Adds a member linked to a specific contact's e-mail address.

public void AddPersonalContact(ItemId contactId, string addressToLink)

Parameters

contactId ItemId

The Id of the contact.

addressToLink string

The contact's address to link to.

AddPublicGroup(string)

Adds a member linked to a Public Group.

public void AddPublicGroup(string smtpAddress)

Parameters

smtpAddress string

The SMTP address of the Public Group.

AddRange(IEnumerable<GroupMember>)

Adds multiple members to the collection.

public void AddRange(IEnumerable<GroupMember> members)

Parameters

members IEnumerable<GroupMember>

The members to add.

Clear()

Clears the collection.

public void Clear()

Find(string)

Finds the member with the specified key in the collection. Members that have not yet been saved do not have a key.

public GroupMember Find(string key)

Parameters

key string

The key of the member to find.

Returns

GroupMember

The member with the specified key.

Remove(GroupMember)

Removes a member from the collection.

public bool Remove(GroupMember member)

Parameters

member GroupMember

The member to remove.

Returns

bool

True if the group member was successfully removed from the collection, false otherwise.

RemoveAt(int)

Removes a member at the specified index.

public void RemoveAt(int index)

Parameters

index int

The index of the member to remove.