Answers for "and if statement c#"

C#
2

how to make if statement c#

if (/*condition here*/)
{
	//code here
}
Posted by: Guest on March-04-2020
1

c# if

int x;
int y;

if ( x == y)
	{
  		Console.WriteLine("x and y is equal");
	}
else
	{
  		Console.WriteLine("x and y is not equal");
	}

// Same, but shorter ( and harder XD )
Console.WriteLine($"x and y {(x == y? "is equal" : "is not equal")}");
Posted by: Guest on March-27-2021

C# Answers by Framework

Browse Popular Code Answers by Language