Skip to content

RECT with Structure #2839

Closed Answered by Keboo
hxhgxy asked this question in Q&A
Discussion options

You must be logged in to vote

In prior versions of the language, the way to check for a given flag is with bitwise operators.

So:

if (edges.HasFlag(ShadowEdges.Left))
{
    ...
}

Becomes:

if ((edges & ShadowEdges.Left) == ShadowEdges.Left)
{
       ...         
}

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by hxhgxy
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants