Click or drag to resize

CompilationCreateAnonymousTypeSymbol Method



Returns a new anonymous type symbol with the given member types member names. Anonymous type members will be readonly by default. Writable properties are supported in VB and can be created by passing in
false
in the appropriate locations in memberIsReadOnly. Source locations can also be provided through memberLocations

Namespace:  Microsoft.CodeAnalysis
Assembly:  Microsoft.CodeAnalysis (in Microsoft.CodeAnalysis.dll) Version: 2.3.0-dev-56735-00. Commit Hash: <developer build>
Syntax
public INamedTypeSymbol CreateAnonymousTypeSymbol(
	ImmutableArray<ITypeSymbol> memberTypes,
	ImmutableArray<string> memberNames,
	ImmutableArray<bool> memberIsReadOnly = null,
	ImmutableArray<Location> memberLocations = null
)

Parameters

memberTypes
Type: ImmutableArrayITypeSymbol
memberNames
Type: ImmutableArrayString
memberIsReadOnly (Optional)
Type: ImmutableArrayBoolean
memberLocations (Optional)
Type: ImmutableArrayLocation

Return Value

Type: INamedTypeSymbol
See Also