PublicApiParameter Class

A parameter of a method, an indexer or a delegate.

public sealed class PublicApiParameter

Properties

NameDescription
Attributes
DefaultValueGets the default value, as stored in metadata. A default struct value is stored as null. A Decimal value is read from the DecimalConstantAttribute of the parameter.
HasDefaultValue
IsOptional
IsParamsGets a value indicating whether the parameter is a params array.
IsParamsCollectionGets a value indicating whether the parameter is a params collection other than an array (e.g. params ReadOnlySpan<T>).
IsScoped
IsThisGets a value indicating whether the parameter is the receiver of an extension method.
NameGets the name of the parameter, or null when metadata does not name it.
OrdinalGets the zero-based position of the parameter.
RefKind
Type
public ImmutableArray<PublicApiAttribute> Attributes { get; }

No documentation is available.

Gets the default value, as stored in metadata. A default struct value is stored as null. A Decimal value is read from the DecimalConstantAttribute of the parameter.

public object? DefaultValue { get; }

Property value

object?

HasDefaultValue

PublicApiParameter.cs
public bool HasDefaultValue { get; }

Property value

bool

No documentation is available.

public bool IsOptional { get; }

Property value

bool

No documentation is available.

Gets a value indicating whether the parameter is a params array.

public bool IsParams { get; }

Property value

bool

IsParamsCollection

PublicApiParameter.cs

Gets a value indicating whether the parameter is a params collection other than an array (e.g. params ReadOnlySpan<T>).

public bool IsParamsCollection { get; }

Property value

bool

public bool IsScoped { get; }

Property value

bool

No documentation is available.

Gets a value indicating whether the parameter is the receiver of an extension method.

public bool IsThis { get; }

Property value

bool

Gets the name of the parameter, or null when metadata does not name it.

public string? Name { get; }

Property value

string?

Gets the zero-based position of the parameter.

public int Ordinal { get; }

Property value

int

public PublicApiRefKind RefKind { get; }

Property value

PublicApiRefKind

No documentation is available.

public PublicApiTypeReference Type { get; }

No documentation is available.

Methods

NameDescription
ToString()
public override string ToString()

Returns

string

No documentation is available.