static class Program
{
static bool HasName(this IEnumerable<string> list, string name)
{
return list.Any(n => string.Compare(n, name, StringComparison.OrdinalIgnoreCase) == 0);
}
static void Main(string[] args)
{
var list = new string[] {"Вася", "Василий", "Вась"};
var name = "ВАСЯ";
if (list.HasName(name))
Console.WriteLine("Совпало");
else
Console.WriteLine("Ошибка");
Console.ReadLine();
}
}
bool isValid = your_sting == "Вася" || your_string == "Василий";