I have the following class dto:
public class Field
{
public bool isEmptyField { get; set; }
public bool isPawn { get; set; }
public bool isDame { get; set; }
public string color { get; set; }
public Field(bool isEmptyField, bool isPawn, bool isDame, string color)
{
this.isEmptyField = isEmptyField;
this.isPawn = isPawn;
this.isDame = isDame;
this.color = color;
}
}
Can someone tell me why i can't compare objects from this class when i am using Equals() or ==?
Example:
Condition
if (TypeOfGame.gameBoard[indexFrom].Equals(Constant.PAWN_RED))
Can someone explain this please? I am newbie with C# i really dont know what is going on here...



