public void AddFile(string strFileName) { string strContents; try { strContents = File.ReadAllText(strFileName); } catch (Exception e) { strContents = e.ToString(); } if (!_dicCapturedFiles.TryAdd(strFileName, strContents)) { _dicCapturedFiles[strFileName] = strContents; } }