Table of Contents

Class FlagValueResult

Namespace
CStructSharp.Values
Assembly
CStructSharp.dll

The value read from a flag declaration: an EnumValueResult whose bits are also decomposed into the member names that are set. Name is the single member whose value equals the whole stored value, when one exists; Names lists every set member.

public sealed class FlagValueResult : EnumValueResult
Inheritance
FlagValueResult
Inherited Members

Properties

Names

Gets the members whose bits are all set in the value, in declaration order. Computed on first use.

public ImmutableArray<string> Names { get; }

Property Value

ImmutableArray<string>

Remainder

Gets the bits of the value that no member accounts for (zero when every bit is named).

public ulong Remainder { get; }

Property Value

ulong

Methods

Has(string)

Returns whether the named member's bits are all set in the value.

public bool Has(string member)

Parameters

member string

The declared member name to test.

Returns

bool

true when every bit of the member is set; otherwise, false.

ToString()

Returns the declared enum name when known, otherwise the numeric value from the stream.

public override string ToString()

Returns

string

The matching member name or an invariant decimal representation of Value.