T-Joe wrote:
Plz give me proper answer
Christian Graus has given you a good proper answer. I didn't respond before since he answered your question just fine. My answer here is just the same as his, but in different words with some differences in supplemental details. You may need to spend some time working your way through the answer multiple times until you understand it.
Also, if you need to modify or update your question, you can edit it. That is more appropriate than adding an answer that isn't one.
T-Joe wrote:
I tried read by byte stream but it gave me some numbers.
That is exactly right and that is exactly what you should have expected before you tried it. All any file is, is
some numbers. The trick is interpreting what they represent. For that you need to what type of file you are dealing with and how it represents things. Your .DVI file might be an Action Media II Digital Video Interactive Movie. It might be a TeX Device Independent Document. It might be something totally different. You, T-Joe, need to determine this first. Then you, T-Joe, will need to research and gather information about that file type. If you are exceedingly fortunate you may turn up a file format specification. You may end up trying to reverse engineer the format. You might find a library you can use - this would be the most effective possibility.
At a guess, but only a guess, it is likely that you are dealing with TeX Device Independent Documents. If this is the case, then you will find lots of information about it when you, T-Joe, use google in your research efforts. You will even turn up source code in C (though I don't expect you to find much, if any, in C#). You will even find information like
this[
^]. Then you will have to leave your sleeves rolled up :-D (you did roll them up to use Google, no?) and apply your elbow grease to the problem you have undertaken.