Method Equals
Equals(Object)
It compares object with the tag and return true if is equal otherwise it will return false
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | object must be of type Tag |
Returns
Type | Description |
---|---|
System.Boolean | True/False |
Overrides
System.Object.Equals(System.Object)
Examples
Example compares multiple tags
Tag tag1 = new Tag("Alpha");
Tag tag2 = new Tag("Beta");
if (tag1.Equals(tag2))
{
Console.WriteLine("Tags are same");
}
else
{
Console.WriteLine("Tags are not same");
}