How can I determine the subsystem used by a given .NET assembly?

前端 未结 4 508
野趣味
野趣味 2020-12-06 19:22

In a C# application, I\'d like to determine whether another .NET application is a Console application or not.

Can this be done using the reflection APIs?

EDI

4条回答
  •  旧时难觅i
    2020-12-06 20:07

    I suppose it should the same as for native apps so then you might be able to adapt this article from C++ to C# to read the PE headers: How To Determine Whether an Application is Console or GUI

提交回复
热议问题