我想要像这样在枚举成员中使用我的IsGPUBasedAttribute
:
public enum EffectType
{
[IsGPUBased(true)]
PixelShader,
[IsGPUBased(false)]
Blur
}
但编译器不允许我使用:
[AttributeUsage (AttributeTargets.Enum, AllowMultiple = false)]
如何正确设置AttributeTarget
值,以限制其作用于枚举成员?