I suppose it should be
while (rndNumber == 1as1 || rndNumber == 1as2)
After ||
operator you need to specify full boolean expresion, there is not shorthand for right argument only.
More Related Contents:
- Operator '==' cannot be applied to operands of type 'int' and 'string
- Meaning of curly braces after the “is” operator
- EF codefirst : Should I initialize navigation properties?
- Reading an integer from user input
- How to delete an element from an array in C#
- Up, Down, Left and Right arrow keys do not trigger KeyDown event
- C# Sort and OrderBy comparison
- System.Text.Json.JsonElement ToObject workaround
- How can I return NULL from a generic method in C#?
- Bulk Update in C#
- How can I set the WiX installer version to the current build version?
- How does comparison operator works with null int?
- Which is the correct C# infinite loop, for (;;) or while (true)? [closed]
- How to check the OS version at runtime, e.g. on Windows or Linux, without using a conditional compilation statement
- How to format TimeSpan in XAML
- Why is this process crashing as soon as it is launched?
- Using Cookie in Asp.Net Mvc 4
- Enum to Dictionary in C#
- MVVM Light RelayCommand Parameters
- Serial Port Polling and Data handling
- C# Entity-Framework: How can I combine a .Find and .Include on a Model Object?
- Why is infinity printed as “8” in the Windows 10 console?
- Is there a way to check whether unicode text is in a certain language?
- Weak reference benefits
- Anonymous Type vs Dynamic Type
- Make DateTimePicker work as TimePicker only in WinForms
- C# Why use SuspendLayout()?
- TableLayoutPanel responds very slowly to events
- How to receive event when user changes system’s culture
- Is Injection Possible through Dynamic LINQ?