Class VBConstantMemberSymbol
A module-level Const declaration. A constant statically evaluates to a value of a fixed
VBType and cannot be assigned at run-time; an Enum member is modelled
separately by VBEnumConstMemberSymbol.
public sealed record VBConstantMemberSymbol : VBReturningMemberSymbol, IEquatable<Symbol>, IEquatable<WorkspaceSymbol>, ITypedSymbol, IEquatable<BoundTypedSymbol>, IEquatable<AccessibleTypedSymbol>, IEquatable<VBTypeMemberSymbol>, IEquatable<VBReturningMemberSymbol>, IEquatable<VBConstantMemberSymbol>
- Inheritance
-
VBConstantMemberSymbol
- Implements
- Inherited Members
Constructors
VBConstantMemberSymbol(Uri, Uri, string, ScopeKind, VBType, SourceRange, SourceRange, AccessModifier, ExpressionNode?)
A module-level Const declaration. A constant statically evaluates to a value of a fixed
VBType and cannot be assigned at run-time; an Enum member is modelled
separately by VBEnumConstMemberSymbol.
public VBConstantMemberSymbol(Uri WorkspaceRoot, Uri ParentUri, string Name, ScopeKind Scope, VBType ResolvedType, SourceRange Range, SourceRange SelectionRange, AccessModifier AccessModifier, ExpressionNode? Value = null)
Parameters
WorkspaceRootUriThe workspace root for this symbol. For an external project or library, this should be different than the user's project workspace.
ParentUriUriThe
Uriof the parent symbol.NamestringThe identifier name of the symbol.
ScopeScopeKindThe allocation scope of the symbol.
ResolvedTypeVBTypeThe resolved VBType of the constant. Use VBUnknownType if the type isn't resolved yet.
RangeSourceRangeA
Rangepointing to the document location that belongs to this symbol.SelectionRangeSourceRangeA
Rangepointing to the document location that should be selected when navigating to this symbol.AccessModifierAccessModifierThe access modifier specified for this symbol. Use Implicit if none is specified.
ValueExpressionNodeThe declaration's own constant expression, or
nullwhen there is none. A constant has no storage to read a value from — it is substituted at each of its use sites — so this expression is the symbol's value.
Properties
Value
The declaration's own constant expression, or null when there is none. A constant has no
storage to read a value from — it is substituted at each of its use sites — so this expression
is the symbol's value.
public ExpressionNode? Value { get; init; }