Get file type in .NET

后端 未结 5 1357
野性不改
野性不改 2020-12-02 19:22

How can i get type of file using c#. for example if a file name id \"abc.png\" and type of file will \"PNG Image\" same as third column \"Type\" in window explorer.

5条回答
  •  心在旅途
    2020-12-02 20:04

    The Win-API function SHGetFileInfo() is your friend. Look here for some code snippets.

提交回复
热议问题