Asp.net what is the difference between = and ==

Asp.net what is the difference between = and ==:



In this post we want to explain the basic difference between “=” and ‘’==” in asp.net programming language.

The single = is called assignment operator  in C# and the == is called the compare operator.
The =(single equal to ) use to assign the value. 


Asp.net what is the difference between = and ==


Means the right side value assign in to left side variable as like that:

Int x,y=10;

Here x and y are two variable and we assign the value of y  is 10.

x = y


Now the Example of ==


 if (x ==y)

 {

// give the massage here…………….

 }

In the if statement above, however, a double equal sign is used (==) to compare the two and return a value: true or false.

Equality operators

Equality (==)

The equality operator converts the operands if they are not of the same type, then applies strict comparison. If both operands are objects, then JavaScript compares internal references which are equal when operands refer to the same object in memory.


JQuery Related Other post:

Today most parsons working with the jQuery UI’s Dialog in an ASP.net website or web applications.

Comments