MapiNamedProperty Class

The name of a named property: a property set and either a numeric identifier (LID) or a string.

public sealed class MapiNamedProperty : IEquatable<MapiNamedProperty>
Implements

Constructors

NameDescription
MapiNamedProperty(Guid, int)Initializes a new instance of the MapiNamedProperty class with a numeric identifier.
MapiNamedProperty(Guid, string)Initializes a new instance of the MapiNamedProperty class with a name.

MapiNamedProperty overloads

MapiNamedProperty(Guid, int)

MapiNamedProperty.cs

Initializes a new instance of the MapiNamedProperty class with a numeric identifier.

public MapiNamedProperty(Guid propertySet, int id)
Parameters
propertySet Guid
The GUID of the property set, such as MapiPropertySets.Appointment.
id int
The numeric identifier (LID) of the property in the set.

MapiNamedProperty(Guid, string)

MapiNamedProperty.cs

Initializes a new instance of the MapiNamedProperty class with a name.

public MapiNamedProperty(Guid propertySet, string name)
Parameters
propertySet Guid
The GUID of the property set, such as MapiPropertySets.PublicStrings.
name string
The name of the property in the set.

Properties

NameDescription
IdGets the numeric identifier (LID), or null when the property has a name.
NameGets the name, or null when the property has a numeric identifier.
PropertySetGets the GUID of the property set.

Gets the numeric identifier (LID), or null when the property has a name.

public int? Id { get; }

Property value

int?

Gets the name, or null when the property has a numeric identifier.

public string? Name { get; }

Property value

string?

Gets the GUID of the property set.

public Guid PropertySet { get; }

Property value

Guid

Methods

NameDescription
Equals(MapiNamedProperty?)Indicates whether the current object is equal to another object of the same type.
Equals(object?)Determines whether the specified object is equal to the current object.
GetHashCode()Serves as the default hash function.
ToString()Returns the property set and the identifier or the name.

Equals overloads

Equals(MapiNamedProperty?)

MapiNamedProperty.cs

Indicates whether the current object is equal to another object of the same type.

public bool Equals(MapiNamedProperty? other)
Parameters
other MapiNamedProperty?
An object to compare with this object.
Returns

bool true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

MapiNamedProperty.cs

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.

Serves as the default hash function.

public override int GetHashCode()

Returns

int A hash code for the current object.

Returns the property set and the identifier or the name.

public override string ToString()

Returns

string A string such as {00062002-0000-0000-c000-000000000046}:0x820D.