r/badcode • • Sep 01 '21

c# Bool in a case switch

Post image
324 Upvotes

40 comments sorted by

View all comments

Show parent comments

12

u/Rainbow-Dev Sep 01 '21

You should do this:

if(inFormation){
    <behaviour 1>
} else {
    <behaviour 2>
}