Are you trying to determine if it's a text file based on the Type of 'System.String' or the name being "TextFile1"? I'm not sure if there's exactly a way to do it based on the fact that it's a text file. This will show all string resources (Text File and String resources), does that work?:
using System.Collections;
using System.Resources;
using System.Globalization;
ResourceSet resourceSet = Properties.Resources.ResourceManager.GetResourceSet(CultureInfo.CurrentUICulture, true, true);
foreach (DictionaryEntry entry in resourceSet)
{
if (entry.Value is string)
{
if (entry.Value.ToString().Contains(x)) { /* etc. */ }
}
}