給出下面的文本文件:保存文件名和HEADERTEXT值作爲鍵值對集合
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
什麼把剛纔的文件名和的HeaderText的集合中值的最佳方法?
for example,
var test = new List<KeyValuePair<string,string>>();
test.Add(Default.aspx, CustomerID);
test.Add(Default.aspx, CompanyName);
test.Add(Default.aspx, ContactName);
只是用Visual Studio進行測試,發現一個nd使用正則表達式選項替換(Ctrl + Shft + H)我嘗試粘貼「HeaderText = \」「(\ w +)\」「但它沒有找到任何東西?應該有3個結果 – Rod 2012-01-08 18:34:55