What you need to clear the code needed for the next email ID to verify email IDs.
Mistake:
var validemails = emails.Where(p=>IsValidFormat(p)).Select;
Dictionary<int, string> emails = new Dictionary<int, string>();
emails.Add(1, "Marry@yahoo.com");
emails.Add(2, "Helan@gmail.com");
emails.Add(3, "Rose");
emails.Add(4, "Ana");
emails.Add(5, "Dhia@yahoo.com");
public static bool IsValidFormat(string InputEmailID)
{
var format =
@"^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}.\.[0-9]{1,3}\.)|
(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$";
Regex Rex=new Regex(format);
return Rex.IsMatch(InputEmailID);
}
Error Report:
Cannot convert from 'System.Collections.Generic.KeyValuePair' to string '
user192332
source
share