C#, Flags Enum, Generic function to look for a flag

后端 未结 11 1572
陌清茗
陌清茗 2020-12-30 05:43

I\'d like one general purpose function that could be used with any Flags style enum to see if a flag exists.

This doesn\'t compile, but if anyone has a suggestion, I

11条回答
  •  -上瘾入骨i
    2020-12-30 06:09

    You're looking to replace one line of code with a function that wraps one line of code? I'd say to just use the one line of code...

提交回复
热议问题