MapiPropertyTag Struct

The tag of a MAPI property: a 16-bit identifier and a 16-bit type.

public readonly struct MapiPropertyTag : IEquatable<MapiPropertyTag>
Implements

Constructors

NameDescription
MapiPropertyTag(ushort, MapiPropertyType)Initializes a new instance of the MapiPropertyTag struct.

MapiPropertyTag(ushort, MapiPropertyType)

MapiPropertyTag.cs

Initializes a new instance of the MapiPropertyTag struct.

public MapiPropertyTag(ushort id, MapiPropertyType type)

Parameters

id ushort
The identifier of the property. Identifiers from 0x8000 are named properties, mapped by each file.
type MapiPropertyType
The type of the property.

Properties

NameDescription
IdGets the identifier of the property.
IsNamedGets whether the identifier is in the range of the named properties (0x8000 and above).
TypeGets the type of the property.
ValueGets the tag as a 32-bit value: the identifier in the high 16 bits and the type in the low 16 bits.

Gets the identifier of the property.

public ushort Id { get; }

Property value

ushort

Gets whether the identifier is in the range of the named properties (0x8000 and above).

public bool IsNamed { get; }

Property value

bool

Gets the type of the property.

public MapiPropertyType Type { get; }

Property value

MapiPropertyType

Gets the tag as a 32-bit value: the identifier in the high 16 bits and the type in the low 16 bits.

public uint Value { get; }

Property value

uint

Methods

NameDescription
Equals(MapiPropertyTag)Indicates whether the current object is equal to another object of the same type.
Equals(object?)Indicates whether this instance and a specified object are equal.
FromValue(uint)Creates a tag from its 32-bit value.
GetHashCode()Returns the hash code for this instance.
ToString()Returns the tag as an hexadecimal value, such as 0x0037001F.

Equals overloads

Equals(MapiPropertyTag)

MapiPropertyTag.cs

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

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

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

Equals(object?)

MapiPropertyTag.cs

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)
Parameters
obj object?
The object to compare with the current instance.
Returns

bool true if obj and this instance are the same type and represent the same value; otherwise, false.

FromValue(uint)

MapiPropertyTag.cs

Creates a tag from its 32-bit value.

public static MapiPropertyTag FromValue(uint value)

Parameters

value uint
The identifier in the high 16 bits and the type in the low 16 bits.

Returns

MapiPropertyTag The tag.

GetHashCode()

MapiPropertyTag.cs

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int A 32-bit signed integer that is the hash code for this instance.

Returns the tag as an hexadecimal value, such as 0x0037001F.

public override string ToString()

Returns

string The tag as an hexadecimal value.

Operators

NameDescription
operator ==(MapiPropertyTag, MapiPropertyTag)Compares two tags.
operator !=(MapiPropertyTag, MapiPropertyTag)Compares two tags.

operator ==(MapiPropertyTag, MapiPropertyTag)

MapiPropertyTag.cs

Compares two tags.

public static bool operator ==(MapiPropertyTag left, MapiPropertyTag right)

Parameters

left MapiPropertyTag
The first tag.
right MapiPropertyTag
The second tag.

Returns

bool true when the tags are equal.

operator !=(MapiPropertyTag, MapiPropertyTag)

MapiPropertyTag.cs

Compares two tags.

public static bool operator !=(MapiPropertyTag left, MapiPropertyTag right)

Parameters

left MapiPropertyTag
The first tag.
right MapiPropertyTag
The second tag.

Returns

bool true when the tags are different.