Click here to Skip to main content
15,914,360 members
Home / Discussions / C#
   

C#

 
QuestionWork with voice applications Pin
Charlesmaster19-Sep-06 11:57
Charlesmaster19-Sep-06 11:57 
QuestionHave anyone done this problem before Pin
tmn11419-Sep-06 11:42
tmn11419-Sep-06 11:42 
AnswerRe: Have anyone done this problem before Pin
Christian Graus19-Sep-06 11:45
protectorChristian Graus19-Sep-06 11:45 
GeneralRe: Have anyone done this problem before Pin
tmn11420-Sep-06 11:05
tmn11420-Sep-06 11:05 
Questiongetting an HTMLInputElement using mshtml.dll Pin
Green Fuze19-Sep-06 11:16
Green Fuze19-Sep-06 11:16 
AnswerRe: getting an HTMLInputElement using mshtml.dll Pin
Nick Parker19-Sep-06 11:46
protectorNick Parker19-Sep-06 11:46 
GeneralRe: getting an HTMLInputElement using mshtml.dll Pin
Green Fuze20-Sep-06 13:14
Green Fuze20-Sep-06 13:14 
Questionautocomplete inside a datagrid Pin
pcflasch19-Sep-06 9:59
pcflasch19-Sep-06 9:59 
AnswerRe: autocomplete inside a datagrid Pin
Nafiseh Salmani19-Sep-06 23:26
Nafiseh Salmani19-Sep-06 23:26 
GeneralRe: autocomplete inside a datagrid Pin
pcflasch20-Sep-06 3:31
pcflasch20-Sep-06 3:31 
GeneralRe: autocomplete inside a datagrid Pin
pcflasch20-Sep-06 3:33
pcflasch20-Sep-06 3:33 
QuestionBuilding unused methods in a class Pin
Nadia Monalisa19-Sep-06 9:04
Nadia Monalisa19-Sep-06 9:04 
AnswerRe: Building unused methods in a class Pin
Dave Kreskowiak19-Sep-06 9:29
mveDave Kreskowiak19-Sep-06 9:29 
GeneralRe: Building unused methods in a class Pin
Nadia Monalisa19-Sep-06 10:42
Nadia Monalisa19-Sep-06 10:42 
GeneralRe: Building unused methods in a class Pin
Dave Kreskowiak19-Sep-06 11:50
mveDave Kreskowiak19-Sep-06 11:50 
GeneralRe: Building unused methods in a class Pin
Nadia Monalisa19-Sep-06 14:53
Nadia Monalisa19-Sep-06 14:53 
QuestionWhen to choose Static Method/Variables rather than Instance Method/Variable Pin
Nadia Monalisa19-Sep-06 8:55
Nadia Monalisa19-Sep-06 8:55 
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 
If the method doesn't use any data from the instance of the class, it should be static. For example, the method File.Exists doesn't use any data other than the string that you send as a parameter.

Static methods are not a problem for multi-threaded applications.

A static variable is stored in the class rather than the instance of the class, so there is always one of the variable no matter if there are zero or a million instances of the class.

As all threads share the same variable, you have to use locking to make the use of a static variable thread safe.




---
b { font-weight: normal; }

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 

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.