given the following text file:
Find all "HeaderText="", Subfolders, Find Results 1, "Entire Solution"
C:\Documents and Settings\user\My Documents\Visual Studio 2008\Projects\WebApplication1\WebApplication1\Default.aspx(16): <asp:BoundField DataField="CustomerID" HeaderText="CustomerID" ReadOnly="True"
C:\Documents and Settings\user\My Documents\Visual Studio 2008\Projects\WebApplication1\WebApplication1\Default.aspx(18): <asp:BoundField DataField="CompanyName" HeaderText="CompanyName"
C:\Documents and Settings\user\My Documents\Visual Studio 2008\Projects\WebApplication1\WebApplication1\Default.aspx(20): <asp:BoundField DataField="ContactName" HeaderText="ContactName"
Matching lines: 3 Matching files: 1 Total files searched: 5
what’s the best way to put just the filename and the value of HeaderText in a collection?
for example,
var test = new List<KeyValuePair<string,string>>();
test.Add(Default.aspx, CustomerID);
test.Add(Default.aspx, CompanyName);
test.Add(Default.aspx, ContactName);
You could use regular expressions:
which could be called like this: