Click here to Skip to main content
16,004,969 members
Home / Discussions / C#
   

C#

 
GeneralRe: Have a question, it is a little difficult. Pin
Christian Graus21-Jan-07 21:39
protectorChristian Graus21-Jan-07 21:39 
GeneralRe: Have a question, it is a little difficult. Pin
Seishin#21-Jan-07 22:31
Seishin#21-Jan-07 22:31 
AnswerRe: Have a question, it is a little difficult. Pin
David Domingues22-Jan-07 4:35
David Domingues22-Jan-07 4:35 
QuestionIs Code running in Windows App or Web Pin
Jeffrey Scott Flesher21-Jan-07 14:36
Jeffrey Scott Flesher21-Jan-07 14:36 
AnswerRe: Is Code running in Windows App or Web Pin
Christian Graus21-Jan-07 14:53
protectorChristian Graus21-Jan-07 14:53 
GeneralRe: Is Code running in Windows App or Web Pin
Jeffrey Scott Flesher21-Jan-07 19:22
Jeffrey Scott Flesher21-Jan-07 19:22 
GeneralRe: Is Code running in Windows App or Web Pin
H. Neville III21-Jan-07 22:24
H. Neville III21-Jan-07 22:24 
GeneralRe: Is Code running in Windows App or Web Pin
Jeffrey Scott Flesher22-Jan-07 7:13
Jeffrey Scott Flesher22-Jan-07 7:13 
public static bool IsWindows
{
get
{
try
{
if (System.Web.HttpContext.Current == null)
{
return true;
}
}
catch
{
}
return false;
}
} // end IsWindows

Thanks it works better then anything else I tried; may not need to put it in a try; it seem to just be null in Windows; but I'm not sure about Mono so it's better than getting an error; but I still think there should be a function to do this; it seems like this is as basic as a function need to see what OS your running like IsMono.

Lessons learned from 911:

1. United We Stand.

2. United’s We Fall.

Gulf War Syndrome survivors never have a good day. http://www.vetshelpcenter.com/

AnswerRe: Is Code running in Windows App or Web Pin
Guffa21-Jan-07 19:19
Guffa21-Jan-07 19:19 
GeneralRe: Is Code running in Windows App or Web Pin
Jeffrey Scott Flesher21-Jan-07 19:33
Jeffrey Scott Flesher21-Jan-07 19:33 
AnswerRe: Is Code running in Windows App or Web Pin
Guffa21-Jan-07 22:07
Guffa21-Jan-07 22:07 
AnswerRe: Is Code running in Windows App or Web [modified] Pin
Abisodun22-Jan-07 2:18
Abisodun22-Jan-07 2:18 
Questionprotect database Pin
ahujap21-Jan-07 13:15
ahujap21-Jan-07 13:15 
AnswerRe: protect database Pin
Christian Graus21-Jan-07 13:29
protectorChristian Graus21-Jan-07 13:29 
GeneralRe: protect database Pin
ahujap21-Jan-07 13:34
ahujap21-Jan-07 13:34 
GeneralRe: protect database Pin
Christian Graus21-Jan-07 14:15
protectorChristian Graus21-Jan-07 14:15 
GeneralRe: protect database Pin
ahujap21-Jan-07 14:27
ahujap21-Jan-07 14:27 
GeneralRe: protect database Pin
Christian Graus21-Jan-07 14:55
protectorChristian Graus21-Jan-07 14:55 
GeneralRe: protect database Pin
ahujap21-Jan-07 14:57
ahujap21-Jan-07 14:57 
GeneralRe: protect database Pin
ahujap21-Jan-07 19:11
ahujap21-Jan-07 19:11 
GeneralRe: protect database Pin
Christian Graus21-Jan-07 21:28
protectorChristian Graus21-Jan-07 21:28 
GeneralRe: protect database Pin
ahujap22-Jan-07 11:37
ahujap22-Jan-07 11:37 
GeneralRe: protect database Pin
Christian Graus22-Jan-07 18:16
protectorChristian Graus22-Jan-07 18:16 
GeneralRe: protect database Pin
ahujap22-Jan-07 18:21
ahujap22-Jan-07 18:21 
GeneralRe: protect database Pin
Christian Graus22-Jan-07 18:30
protectorChristian Graus22-Jan-07 18:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.