Open sandboxFocus

Property Name

Name

Gets or sets the requested name of the field, or null.

Declaration
public string Name { get; set; }
Property Value
Type Description
string
Remarks

The requested name serves two purposes. It finds an existing field of this name, as specified by WhenCompatibleFieldExists. It is also the name of the field that the request introduces, or, when another member already has this name, the stem of that name: IntroduceAnother and IntroduceAnother then append a number that makes the name unique in the type, such as handlers2.

Without a requested name, an existing field is recognized by its type, and a new field gets a generated name that cannot conflict with source code.

The advices of the aspect import the field by the requested name, whatever its real name. A name with a suffix depends on the order of the aspects, so a field that other code must find by name does not use IntroduceAnother or IntroduceAnother.