how to identify a file is a text file or other using c#.net
- by bjh Hans
I need to access a file as text file and want to process it later. But before I fetch it how I can identify a file that I am taking is a text file only. If file is in another format my whole code interpret wrongly. I want to access and process only text file.
Currently i am using:
StreamReader objReader = new StreamReader(filePath);
How can I do so in C# .NET?