Using a OR'ed Enum in a custom UITypeEditor

前端 未结 2 1317
有刺的猬
有刺的猬 2021-01-28 07:52

I have a property on a custom control I have written that is an Flag based Enum. I created my own custom control to edit it in a way that makes logical sense and called it from

2条回答
  •  灰色年华
    2021-01-28 08:23

    Using the Flags attribute on the enum will prevent the error from happening. This is a mystery to me as storing an ORed enum without the flag is valid and can be done in the code (With a proper cast).

提交回复
热议问题