Open sandboxFocus

Property WhenExists

WhenExists

Gets or sets the strategy to use when a member with the same name already exists in the target type.

Declaration
public OverrideStrategy WhenExists { get; set; }
Property Value
Type Description
OverrideStrategy
Remarks

The default value is Fail, which reports an error when a conflict is detected. Other options include:

  • Override: Replace the existing member with the introduced one
  • Ignore: Skip introducing the member without reporting an error
  • New: Introduce the member with the new modifier, hiding the existing member