Reputation: 127
In a class library project, I added a folder named 'READ', I then added a text file('test.txt') in that folder. Using System.Reflection, is it possible to read test.txt file. If I add test.txt file as resource and then add this class library as reference I can access test.txt file. But I would like to know using reflection whether its possible to read the text file.
Upvotes: 0
Views: 697
Reputation: 557
The System.Reflection API allows your code to do things with .Net types (classes, structs, etc). It does not contain any tools for opening or reading files.
You should be looking at System.IO instead.
Upvotes: 3