Skip to content

CSharpSymbol

This is the base type for all symbols in C#.

Many subtypes of this symbol exist for specific purposes. However, this symbol may be used in cases where a more specific symbol is not required.

Extends OutputSymbol

constructor(name: string | Namekey, spaces: OutputSpace[] | OutputSpace | undefined, options: CSharpSymbolOptions)Constructs a new instance of the CSharpSymbol class
accessibilityDeclaredAccessibility | undefined
copy() => CSharpSymbol
debugInfoRecord<string, unknown>
enclosingNamespaceNamespaceSymbol | undefined
isAbstractbooleanWhether this symbol is abstract.
isExternbooleanWhether this symbol is extern.
isNullablebooleanWhether this symbol might contain null. True if this symbol has a typeSymbol and that symbol is nullable, or else when this symbol has the nullable option set.
isOverridebooleanWhether this symbol is override.
isReadOnlybooleanWhether this symbol is readonly.
isSealedbooleanWhether this symbol is sealed.
isStaticbooleanWhether this symbol is static.
isVirtualbooleanWhether this symbol is virtual.
symbolKindCSharpSymbolKinds

This is roughly equivalent to the Roslyn ISymbol interface: https://learn.microsoft.com/en-us/dotnet/api/microsoft.codeanalysis.isymbol?view=roslyn-dotnet-4.13.0