c# greater than and equal to
if (7 >= 6) {
//Anything here will be called if 7 is greater than OR equal to 6.
//Meaning this will be called.
}
if (6 >= 6) {
//Anything here will be called if 6 is greater than OR equal to 6,
//Meaning this will be called.
}
if (6 > 6) {
//The reason you may want to use ">=" instead of ">" is because
//This statement will not be called, which you may not want.
//Anything here will be called if 6 is greater than 6.
}
4.1
71
if (5 <= 6) {
//Anything here will be called if 5 is less than OR equal to 6.
//Meaning this will be called.
}
if (6 <= 6) {
//Anything here will be called if 6 is less than OR equal to 6,
//Meaning this will be called.
}
if (6 < 6) {
//The reason you may want to use "<=" instead of "<" is because
//This statement will not be called, which you may not want.
//Anything here will be called if 6 is less than 6,
}
Thank you!
71
0
Are there any code examples left?
New code examples in category C#