DEV Community

Nuriddin
Nuriddin

Posted on

C# da ifodalarni tekshirishning ustuvorligi va tartibi

Quyidagi roʻyxatda pattern kombinatorlarinig ustuvorligi kamayib borish tartibida ko'rsatilgan:

  • not
  • and
  • or

Quyidagi misolda ko'rsatilganidek, ustuvorlikni aniq belgilash uchun qavslardan foydalanilgan:

static bool IsLetter(char c) => c is (>= 'a' and <= 'z') or (>= 'A' and <= 'Z');
Enter fullscreen mode Exit fullscreen mode

Qo'shimcha malumot olish uchun pattern combinators bo'limiga qarang.

Top comments (0)