Check whether new contact already exists in Xero

Clash Royale CLAN TAG#URR8PPPCheck whether new contact already exists in Xero
I am using Visual Studio C# winforms and have installed the Nuget wrapper. I am trying to check whether a contact record already exists in the Xero database.
string expected = "Test";
var name=api.Contacts
.Where(string.Format("Name == "{0}"", expected))
.Find()
.Select(p => p.Name);
bool exists = (name.All(p => p == expected)
This code is returning True even when the record does not exist. Assistance would be appreciated.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.