© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
62 replies
Jasonnn

merge into pattern

So I've read about patterns a bit



I have :
                if (!(i is >= 5 and <= 7))
                {
                    inputData2[0].XB1[i] = 1.0f;
                }
                if (!(i is >= 5 and <= 7))
                {
                    inputData2[0].XB1[i] = 1.0f;
                }

Should I really reformat that as
(my IDE tells me to, cf. screenshot)
                if (i is < 5 or > 7)
                {
                    inputData2[0].XB1[i] = 1.0f;
                }
                if (i is < 5 or > 7)
                {
                    inputData2[0].XB1[i] = 1.0f;
                }


why is my IDE so adament on me using them, is there really beneficial about it?
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements
Next page

Similar Threads

❔ Merge dll into exe
C#CC# / help
3y ago
Merge objects game
C#CC# / help
2y ago
Merge two separate databases
C#CC# / help
3y ago