Click here to Skip to main content
15,888,217 members
Home / Discussions / C#
   

C#

 
AnswerRe: When to choose Static Method/Variables rather than Instance Method/Variable Pin
Dave Kreskowiak19-Sep-06 10:03
mveDave Kreskowiak19-Sep-06 10:03 
AnswerRe: When to choose Static Method/Variables rather than Instance Method/Variable Pin
Guffa19-Sep-06 10:35
Guffa19-Sep-06 10:35 
GeneralRe: When to choose Static Method/Variables rather than Instance Method/Variable Pin
Nadia Monalisa19-Sep-06 10:48
Nadia Monalisa19-Sep-06 10:48 
GeneralRe: When to choose Static Method/Variables rather than Instance Method/Variable Pin
Christian Graus19-Sep-06 13:19
protectorChristian Graus19-Sep-06 13:19 
GeneralRe: When to choose Static Method/Variables rather than Instance Method/Variable Pin
Nadia Monalisa19-Sep-06 14:38
Nadia Monalisa19-Sep-06 14:38 
GeneralRe: When to choose Static Method/Variables rather than Instance Method/Variable Pin
Christian Graus19-Sep-06 14:47
protectorChristian Graus19-Sep-06 14:47 
GeneralRe: When to choose Static Method/Variables rather than Instance Method/Variable Pin
Nadia Monalisa19-Sep-06 16:25
Nadia Monalisa19-Sep-06 16:25 
GeneralRe: When to choose Static Method/Variables rather than Instance Method/Variable Pin
Christian Graus19-Sep-06 16:40
protectorChristian Graus19-Sep-06 16:40 
I'm not sure that you're getting the concept. The concept is, if two threads change a value, it's possible that data will be lost if one is half way through doing something and the other one steps in. If values are not being changed, no locking is required.

you would, however, be better off doing something like this:

public static string DataPassword { get { return "abcd"; } }

or at least mark then all readonly. static values can still be changed.


Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog

GeneralRe: When to choose Static Method/Variables rather than Instance Method/Variable Pin
Nadia Monalisa19-Sep-06 17:30
Nadia Monalisa19-Sep-06 17:30 
GeneralRe: When to choose Static Method/Variables rather than Instance Method/Variable Pin
Nadia Monalisa2-Oct-06 4:32
Nadia Monalisa2-Oct-06 4:32 
QuestionLeft Function in C# Pin
MyRunner2319-Sep-06 7:34
MyRunner2319-Sep-06 7:34 
AnswerRe: Left Function in C# Pin
Jon Sagara19-Sep-06 7:41
Jon Sagara19-Sep-06 7:41 
AnswerRe: Left Function in C# Pin
Eric Dahlvang19-Sep-06 7:45
Eric Dahlvang19-Sep-06 7:45 
GeneralRe: Left Function in C# Pin
samtam19-Sep-06 22:13
samtam19-Sep-06 22:13 
GeneralRe: Left Function in C# Pin
Eric Dahlvang20-Sep-06 4:33
Eric Dahlvang20-Sep-06 4:33 
GeneralRe: Left Function in C# Pin
samtam20-Sep-06 20:26
samtam20-Sep-06 20:26 
QuestionHow to capture the URL? Pin
zhoujun19-Sep-06 5:11
zhoujun19-Sep-06 5:11 
QuestionCalculating scientific notation? Pin
Goalie3519-Sep-06 5:10
Goalie3519-Sep-06 5:10 
AnswerRe: Calculating scientific notation? Pin
Stefan Troschuetz19-Sep-06 5:24
Stefan Troschuetz19-Sep-06 5:24 
QuestionSet resolution in Metafiles Pin
cubeccu19-Sep-06 5:07
cubeccu19-Sep-06 5:07 
Questionwriting to string resource Pin
likefood19-Sep-06 4:57
likefood19-Sep-06 4:57 
QuestionProblems with a custom tooltip [modified] Pin
Gags66619-Sep-06 4:36
Gags66619-Sep-06 4:36 
Questionhow we I call a method from other .cs file... Pin
irkahc19-Sep-06 3:23
irkahc19-Sep-06 3:23 
AnswerRe: how we I call a method from other .cs file... Pin
albCode19-Sep-06 4:22
albCode19-Sep-06 4:22 
GeneralRe: how we I call a method from other .cs file... Pin
irkahc19-Sep-06 17:34
irkahc19-Sep-06 17:34 

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.