• Advertisement
Sign in to follow this  

[.net] Determine file type

This topic is 3842 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am looking for way to determine if a certain file is a .NET IL file as opposed to a normal .dll or .exe. I'm not picky on the language used to achieve this (if there is no way to do it from the command-line). Any help appreciated.

Share this post


Link to post
Share on other sites
Advertisement
You might try:

try{
Assembly.LoadFile(yourFile);
//managed
}catch(BadImageFormatException){
//not managed
}



hope this helps

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement