C# How can I test a file is a jpeg?

后端 未结 16 2336
失恋的感觉
失恋的感觉 2020-11-27 03:28

Using C# how can I test a file is a jpeg? Should I check for a .jpg extension?

Thanks

16条回答
  •  情深已故
    2020-11-27 03:46

    Depending on the context in which you're looking at this file, you need to remember that you can't open the file until the user tells you to open it.

    (The link is to a Raymond Chen blog entry.)

提交回复
热议问题