Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

C# Relational Operators

using System;
 
namespace Operator
{
	class RelationalOperator
	{
		public static void Main(string[] args)
		{
			bool result;
			int firstNumber = 10, secondNumber = 20;

			result = (firstNumber==secondNumber);
			Console.WriteLine("{0} == {1} returns {2}",firstNumber, secondNumber, result);

			result = (firstNumber > secondNumber);
			Console.WriteLine("{0} > {1} returns {2}",firstNumber, secondNumber, result);

			result = (firstNumber < secondNumber);
			Console.WriteLine("{0} < {1} returns {2}",firstNumber, secondNumber, result);

			result = (firstNumber >= secondNumber);
			Console.WriteLine("{0} >= {1} returns {2}",firstNumber, secondNumber, result);

			result = (firstNumber <= secondNumber);
			Console.WriteLine("{0} <= {1} returns {2}",firstNumber, secondNumber, result);

			result = (firstNumber != secondNumber);
			Console.WriteLine("{0} != {1} returns {2}",firstNumber, secondNumber, result);
		}
	}
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: How do I remove a String Array from a List in C# 
Csharp :: Return out of a Ienumerator/Courotine in C# 
Csharp :: json.net jobject replace value 
Csharp :: how download file from internet and move it to folder with c# 
Csharp :: read text c# 
Csharp :: how to make a c# encrypt and decrypt string cmd 
Csharp :: Helper Routine GetRect¶ Calculates the area of a scaled down page: 
Csharp :: c# order of initialization 
Csharp :: C# how to search textfile and append 
Csharp :: unittest servicector automapper 
Csharp :: skrivetækning 
Csharp :: how to remove something in c# 
Csharp :: two lowest positive numbers given an array of minimum 
Csharp :: asp.net core httpdelete with body 
Csharp :: c# move picturebox 
Csharp :: search list for words c# 
Csharp :: ef core save keyless entity 
Csharp :: in clause db2 c# 
Csharp :: check which activity in focus in android 
Csharp :: unity play audio from particle system 
Csharp :: c sharp Enum class 
Csharp :: Diplay player final score in new scene in unity 
Csharp :: c# linq unique by property 
Csharp :: .net disable show exception 
Csharp :: sterge element din coada c# 
Csharp :: Find Number of Repetitions of Substring 
Csharp :: C# WriteLine() and Write() 
Csharp :: nullable 
Csharp :: c# summary angle brackets 
Csharp :: get path revit linked unload 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =