Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Web;
- private static bool IsWebApp()
- {
- return (HttpContext.Current != null);
- }
- /// you can call this check in your constructor, or where ever.
- if (IsWebApp())
- {
- /// ... your code here for web
- }
- else
- {
- /// ... your code here for windows/winforms
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement