[AttributeUsage(AttributeTargets.Property)]
public class MyAttribute : Attribute
{
...
}
chcę tego atrybutu niestandardowego używany zarówno na właściwości i fileds ale inne nie. Jak przypisać wiele celów (AttributeTargets.Property
i AttributeTargets.Field
)? Lub po prostu nie jest możliwe?Wiele AttributeTargets w AttributeUsage
I nie jest to, czego chcę, to AttributeTargets.All
.
Dzięki stary! Próbowałem '||' ale nigdy nie myślałem o '|'. –