public DataTable GetPersonalInfoWithPublicDomain() { DataTable dt = new DataTable(); logger.AppendLog("Checking file path.."); if (File.Exists(this.FileName)) { logger.AppendLog("File found."); string[] inputData = GetDataFromCsvFile(); List <string> matchingData = new List <string>(); logger.AppendLog("Adding column header.."); matchingData.Add(inputData[0]); foreach (string publicDomain in this.PublicDomainList) { logger.AppendLog("Scanning for email ids with domain name: " + publicDomain); var filteredData = inputData.Where(r => r.Contains(publicDomain)); matchingData.AddRange(filteredData); } dt = csvProcessor.GetDataTableFromCsv(matchingData.ToArray(), delimiter); } else { logger.AppendError("File not found."); } return(dt); }