Click here to Skip to main content
15,890,345 members
Home / Discussions / C#
   

C#

 
GeneralRe: Getting exception message "Incorrect syntax near '(' " in C# web app Pin
Luc Pattyn28-Mar-19 23:47
sitebuilderLuc Pattyn28-Mar-19 23:47 
GeneralRe: Getting exception message "Incorrect syntax near '(' " in C# web app Pin
GenJerDan29-Mar-19 1:39
GenJerDan29-Mar-19 1:39 
GeneralRe: Getting exception message "Incorrect syntax near '(' " in C# web app Pin
Eddy Vluggen29-Mar-19 2:56
professionalEddy Vluggen29-Mar-19 2:56 
QuestionDebugging + MSTest + Multiple Startup Project question Pin
Super Lloyd28-Mar-19 19:59
Super Lloyd28-Mar-19 19:59 
AnswerRe: Debugging + MSTest + Multiple Startup Project question Pin
Super Lloyd1-Apr-19 14:04
Super Lloyd1-Apr-19 14:04 
QuestionLooks like C# does not support Global Variables Pin
Brian_TheLion27-Mar-19 23:43
Brian_TheLion27-Mar-19 23:43 
AnswerRe: Looks like C# does not support Global Variables Pin
Richard MacCutchan27-Mar-19 23:46
mveRichard MacCutchan27-Mar-19 23:46 
AnswerRe: Looks like C# does not support Global Variables Pin
OriginalGriff27-Mar-19 23:57
mveOriginalGriff27-Mar-19 23:57 
The idea is that you don't need global variables in C#, and by and large it's true.
You can simulate them using static :
C#
public static class Globals
    {
    public static int GlobalInteger = 666;
    }
...
    Console.WriteLine(Globals.GlobalInteger);
but I've only done it with a handful of variables in all the C# code I've ever written.
If you need lots of globals, it's normally a BIG sign that your whole design is wildly wrong.

I'd seriously think about the whole structure of your app if I were you - it's sounding very much like you didn't read any of the books after all.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!

GeneralRe: Looks like C# does not support Global Variables Pin
Richard MacCutchan28-Mar-19 0:08
mveRichard MacCutchan28-Mar-19 0:08 
GeneralRe: Looks like C# does not support Global Variables Pin
Brian_TheLion28-Mar-19 0:09
Brian_TheLion28-Mar-19 0:09 
GeneralRe: Looks like C# does not support Global Variables Pin
OriginalGriff28-Mar-19 0:21
mveOriginalGriff28-Mar-19 0:21 
GeneralRe: Looks like C# does not support Global Variables Pin
Brian_TheLion28-Mar-19 0:35
Brian_TheLion28-Mar-19 0:35 
GeneralRe: Looks like C# does not support Global Variables Pin
OriginalGriff28-Mar-19 0:42
mveOriginalGriff28-Mar-19 0:42 
GeneralRe: Looks like C# does not support Global Variables Pin
Brian_TheLion28-Mar-19 0:49
Brian_TheLion28-Mar-19 0:49 
GeneralRe: Looks like C# does not support Global Variables Pin
Luc Pattyn28-Mar-19 0:32
sitebuilderLuc Pattyn28-Mar-19 0:32 
GeneralRe: Looks like C# does not support Global Variables Pin
Brian_TheLion28-Mar-19 0:41
Brian_TheLion28-Mar-19 0:41 
GeneralRe: Looks like C# does not support Global Variables Pin
Luc Pattyn28-Mar-19 0:51
sitebuilderLuc Pattyn28-Mar-19 0:51 
GeneralRe: Looks like C# does not support Global Variables Pin
Brian_TheLion28-Mar-19 0:57
Brian_TheLion28-Mar-19 0:57 
GeneralRe: Looks like C# does not support Global Variables Pin
Luc Pattyn28-Mar-19 1:07
sitebuilderLuc Pattyn28-Mar-19 1:07 
GeneralRe: Looks like C# does not support Global Variables Pin
Brian_TheLion28-Mar-19 1:31
Brian_TheLion28-Mar-19 1:31 
GeneralRe: Looks like C# does not support Global Variables Pin
Luc Pattyn28-Mar-19 1:37
sitebuilderLuc Pattyn28-Mar-19 1:37 
GeneralRe: Looks like C# does not support Global Variables Pin
Brian_TheLion28-Mar-19 2:03
Brian_TheLion28-Mar-19 2:03 
GeneralRe: Looks like C# does not support Global Variables Pin
OriginalGriff28-Mar-19 3:26
mveOriginalGriff28-Mar-19 3:26 
GeneralRe: Looks like C# does not support Global Variables Pin
Brian_TheLion28-Mar-19 16:54
Brian_TheLion28-Mar-19 16:54 
GeneralRe: Looks like C# does not support Global Variables Pin
OriginalGriff29-Mar-19 2:33
mveOriginalGriff29-Mar-19 2:33 

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.