First time poster here so hopefully will not get flamed too badly ;) I am trying to teach myself C# and am using VS2005 right now on XP.
Here is the code snippet I have after doing a streamreader:
Basically it reads a file and if the first list does not contain the file then it sends it to the original list. If it does contain the value then it goes to the duplicate list. This part works and will give me the duplicate filenames.
My question is this:
How would I go about retrieving the value in the master list that they are duplicating? I am about google'd out. I was thinking of some sort of search in the list, but am not too familiar with that process yet.
Any help is appreciated. (no comments on the god-awful coding structure ;) I am a noob and it will get better I hope! )
Patrick
(Hope I posted everything correctly.)
Here is the code snippet I have after doing a streamreader:
Code:
string[] llarray = line.Split(',');
string labelInfo = llarray[1].ToString() + "-" + llarray[2].ToString();
string completelabelInfo = llarray[1].ToString() + "-" + llarray[2].ToString() + "," + fileName;
if (masterLabelInfo.Contains(labelInfo))
{
duplicateFileNames.Add(completelabelInfo);
}
else
{
masterLabelInfo.Add(labelInfo);
}
My question is this:
How would I go about retrieving the value in the master list that they are duplicating? I am about google'd out. I was thinking of some sort of search in the list, but am not too familiar with that process yet.
Any help is appreciated. (no comments on the god-awful coding structure ;) I am a noob and it will get better I hope! )
Patrick
(Hope I posted everything correctly.)
Comment