Код: Выделить всё
enum ControlType { Foo }
class A
{
public ControlType ControlType = ControlType.Foo;
}
class B
{
public ControlType? ControlType = ControlType.Foo; //
Подробнее здесь: [url]https://stackoverflow.com/questions/78506904/why-is-it-possible-to-refer-to-enum-values-when-a-field-is-named-identically-to[/url]