Class EmptiedControlReadFact
A read of the control variable of a For Each loop that every code path reaches only through the loop running out, with nothing assigned to the
variable since (MS-VBAL §5.4.2.4).
public sealed record EmptiedControlReadFact : IEquatable<EmptiedControlReadFact>
- Inheritance
-
EmptiedControlReadFact
- Implements
- Inherited Members
Remarks
MS-VBAL says that once the loop has finished, the control variable holds the last element. MS-VBA empties it instead when the collection runs out, or has no
element at all, and RD-VBA does the same (RD-VBAL §5.4.2.4): what the read finds is Empty, or Nothing for an object variable,
where the specification says the last element.
Constructors
EmptiedControlReadFact(string, SourceLocation, bool)
A read of the control variable of a For Each loop that every code path reaches only through the loop running out, with nothing assigned to the
variable since (MS-VBAL §5.4.2.4).
public EmptiedControlReadFact(string Name, SourceLocation Location, bool IsObject)
Parameters
NamestringThe name of the control variable, as the read writes it.
LocationSourceLocationWhere the read is written.
IsObjectboolWhether the variable is declared as an object, which the loop leaves
Nothing;Emptyotherwise.
Remarks
MS-VBAL says that once the loop has finished, the control variable holds the last element. MS-VBA empties it instead when the collection runs out, or has no
element at all, and RD-VBA does the same (RD-VBAL §5.4.2.4): what the read finds is Empty, or Nothing for an object variable,
where the specification says the last element.
Properties
IsObject
Whether the variable is declared as an object, which the loop leaves Nothing; Empty otherwise.
public bool IsObject { get; init; }
Property Value
Location
Where the read is written.
public SourceLocation Location { get; init; }
Property Value
Name
The name of the control variable, as the read writes it.
public string Name { get; init; }