Hello All-
Below is code used to search a string where Identity=" " exists and stores that line in a List. I need to add to this search so that it not only picks up Identity=" " but ALSO where FrameworkSiteID=" ". How can I modify the below code to do this?
Many thanks.
List<KeyValuePair<string, string>> IdentityLines = new List<KeyValuePair<string, string>>();
foreach(FileInfo file in Files)
{
string line = "";
using(StreamReader sr = new StreamReader(file.FullName))
{
while(!String.IsNullOrEmpty(line = sr.ReadLine()))
{
if (line.ToUpper().Contains("IDENTITY="))
{
string login = reg.Match(line).Groups[0].Value;
IdentityLines.Add(new KeyValuePair<string, string>(file.Name, login));
}
else
{
IdentityLines.Add(new KeyValuePair<string, string>(file.Name,"NO LOGIN"));
}
}
//More additional code, not included..