Answers for "c# greater than and equal to"

C#
2

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.
}
Posted by: Guest on July-16-2021
2

c# less than and equal to

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,
}
Posted by: Guest on July-16-2021

Code answers related to "c# greater than and equal to"

C# Answers by Framework

Browse Popular Code Answers by Language