1

hiii all
do any1 knows how to read the header of a file to know its format
as example if i've a mp3 file but it's name do not include .mp3
i wanna make a program that read the header of the file and detect it's format but i dont know how to read the header in c#
plzzzzzzzz help anythng u send could help :)
tnx

4
Contributors
4
Replies
6
Views
11 Years
Discussion Span
Last Post by tayspen
1

I tried this a while ago, and its not 100% possible because i think not all files contain a header or such that says what the file is

1

hiii all
do any1 knows how to read the header of a file to know its format
as example if i've a mp3 file but it's name do not include .mp3
i wanna make a program that read the header of the file and detect it's format but i dont know how to read the header in c#
plzzzzzzzz help anythng u send could help :)
tnx

try.....string extension = Path.GetExtension(file);

1

He wants to use the header of the file.

What if for some reason it has no extension? Then that way won't work ;).

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.