C#C
C#8mo ago
MTMB

✅ What is the `or` operator called?

I'm tryna find docs for the or operator. Is it any different to ||? Whenever I try to search for it then it just comes up with ||, and its not listed here: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/

When I use it like this it seems to run against both things?
string name = "bob";
Console.WriteLine(name is "bob" or "alice");
Was this page helpful?