ok what im trying to do is loop though a folder with multible filenames and i want to search for multible strings and if found add a key and the value to Dictionary because i need all files in the folder needs to be stored like
ads_fire look for text in the filename that has ads_fire in the filename once found it stores the filename
so once found want to be added in to a Dictionary like animnames.add(ads_fire,adsfire)
the below code works but only works on one filename i have like 20 of these i have to do and need to make the key match the value
string partialName = "ads_fire";
DirectoryInfo hdDirectoryInWhichToSearch = new DirectoryInfo(testdir);
FileInfo[] filesInDir = hdDirectoryInWhichToSearch.GetFiles("*" + partialName + "*.*");
foreach (FileInfo foundFile in filesInDir)
{
string fullName = foundFile.Name;
animnames.Add("ads_fire", fullName);
richTextBox1.Text = animnames["ads_fire"];
}
and this is the resualt i want but i want it for all anims not just the ads_fire one result of code sniplet