Table of Contents

Class FolderId

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

Represents the Id of a folder.

public sealed class FolderId : ServiceId
Inheritance
FolderId
Inherited Members

Constructors

FolderId(WellKnownFolderName)

Initializes a new instance of the FolderId class. Use this constructor to link this FolderId to a well known folder (e.g. Inbox, Calendar or Contacts).

public FolderId(WellKnownFolderName folderName)

Parameters

folderName WellKnownFolderName

The folder name used to initialize the FolderId.

FolderId(WellKnownFolderName, Mailbox)

Initializes a new instance of the FolderId class. Use this constructor to link this FolderId to a well known folder (e.g. Inbox, Calendar or Contacts) in a specific mailbox.

public FolderId(WellKnownFolderName folderName, Mailbox mailbox)

Parameters

folderName WellKnownFolderName

The folder name used to initialize the FolderId.

mailbox Mailbox

The mailbox used to initialize the FolderId.

FolderId(string)

Initializes a new instance of the FolderId class. Use this constructor to link this FolderId to an existing folder that you have the unique Id of.

public FolderId(string uniqueId)

Parameters

uniqueId string

The unique Id used to initialize the FolderId.

Properties

FolderName

Gets the name of the folder associated with the folder Id. Name and Id are mutually exclusive; if one is set, the other is null.

public WellKnownFolderName? FolderName { get; }

Property Value

WellKnownFolderName?

Mailbox

Gets the mailbox of the folder. Mailbox is only set when FolderName is set.

public Mailbox Mailbox { get; }

Property Value

Mailbox

Methods

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Exceptions

NullReferenceException

The obj parameter is null.

GetHashCode()

Serves as a hash function for a particular type.

public override int GetHashCode()

Returns

int

A hash code for the current object.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Operators

implicit operator FolderId(WellKnownFolderName)

Defines an implicit conversion between WellKnownFolderName and FolderId.

public static implicit operator FolderId(WellKnownFolderName folderName)

Parameters

folderName WellKnownFolderName

The folder name to convert to FolderId.

Returns

FolderId

A FolderId initialized with the specified folder name.

implicit operator FolderId(string)

Defines an implicit conversion between string and FolderId.

public static implicit operator FolderId(string uniqueId)

Parameters

uniqueId string

The unique Id to convert to FolderId.

Returns

FolderId

A FolderId initialized with the specified unique Id.