Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Equals() Method To Compare Values

DZone's Guide to

Equals() Method To Compare Values

·
Free Resource
Equals method to compare values


        int price = 100;
        int amount = 1000
        if (price.Equals(amount))
	{
	    Console.WriteLine("Price is equal to amount");
	}
        else
        {
	    Console.WriteLine("Price is not equal to amount");
        }
Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}