public override bool Equals(object obj) { var anotherAccount = obj as AzureAccount; if (anotherAccount == null) { return false; } else { return string.Equals(anotherAccount.Id, Id, StringComparison.InvariantCultureIgnoreCase); } }