Metalama 1.0 / / Metalama Documentation / Aspect API / Metalama.​Framework.​Code / Attribute­Extensions / Try­Get­Named­Argument

Method TryGetNamedArgument

TryGetNamedArgument(IAttribute, String, out TypedConstant)

Tries to get a named argument (i.e. the value assigned to a field or property).

Declaration
public static bool TryGetNamedArgument(this IAttribute attribute, string name, out TypedConstant value)
Parameters
Type Name Description
IAttribute attribute
String name
TypedConstant value
Returns
Type Description
Boolean

true if the attribute defines this named argument, otherwise false.