Can a C# Class Determine if it is being called from a Console, Service or Windows Form?
Posted on 2014-01-13
I have a static class that I have created in C#. I have been testing my static Class using a console application. Now that my testing is done, I am going to integrate this to a Windows Service.
Is it possible to determine from within the static Class if it is being called from a Console, Service or a Windows Form application? Depending on the type of application it is being used in, there are some functions that I would want to preform differently.