Click here to Skip to main content
15,898,587 members
Home / Discussions / C#
   

C#

 
AnswerRe: # color Pin
Luc Pattyn24-Oct-07 11:36
sitebuilderLuc Pattyn24-Oct-07 11:36 
GeneralRe: # color Pin
MasterSharp24-Oct-07 11:38
MasterSharp24-Oct-07 11:38 
GeneralRe: # color Pin
MasterSharp24-Oct-07 11:42
MasterSharp24-Oct-07 11:42 
GeneralRe: # color Pin
Luc Pattyn24-Oct-07 12:38
sitebuilderLuc Pattyn24-Oct-07 12:38 
Questionauto-method [modified] Pin
MasterSharp24-Oct-07 10:55
MasterSharp24-Oct-07 10:55 
AnswerRe: auto-method Pin
il_masacratore24-Oct-07 11:12
il_masacratore24-Oct-07 11:12 
GeneralRe: auto-method Pin
MasterSharp24-Oct-07 11:22
MasterSharp24-Oct-07 11:22 
GeneralRe: auto-method Pin
Christian Graus24-Oct-07 12:28
protectorChristian Graus24-Oct-07 12:28 
Also, for simple timer methods, I like to use anonymous delegates. Like this:

myTimer.Tick += delegate { Invalidate(); };

The invalidate is just the sample code inside the anonymous delegate, you can put anything there.

When you do this, any variables created inside the method that defnes the delegate are in scope, but I like it more because it defines what the timer does at the point that I create it.


Christian Graus - Microsoft MVP - C++

"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

QuestionModular Program Pin
murtle324-Oct-07 9:38
murtle324-Oct-07 9:38 
QuestionRe: Modular Program Pin
TJoe24-Oct-07 9:48
TJoe24-Oct-07 9:48 
AnswerRe: Modular Program Pin
murtle324-Oct-07 19:06
murtle324-Oct-07 19:06 
GeneralRe: Modular Program Pin
PandemoniumPasha24-Oct-07 19:30
PandemoniumPasha24-Oct-07 19:30 
GeneralRe: Modular Program Pin
murtle324-Oct-07 19:38
murtle324-Oct-07 19:38 
AnswerRe: Modular Program Pin
PandemoniumPasha24-Oct-07 19:51
PandemoniumPasha24-Oct-07 19:51 
GeneralRe: Modular Program Pin
murtle325-Oct-07 4:02
murtle325-Oct-07 4:02 
AnswerRe: Modular Program Pin
Christian Graus24-Oct-07 12:52
protectorChristian Graus24-Oct-07 12:52 
QuestionHow to remove part of the text in RichTextBox Pin
Ermak8624-Oct-07 9:05
Ermak8624-Oct-07 9:05 
AnswerRe: How to remove part of the text in RichTextBox Pin
TJoe24-Oct-07 9:27
TJoe24-Oct-07 9:27 
GeneralRe: How to remove part of the text in RichTextBox Pin
Ermak8624-Oct-07 10:02
Ermak8624-Oct-07 10:02 
AnswerRe: Open Default Defragmenter Pin
TJoe24-Oct-07 9:00
TJoe24-Oct-07 9:00 
GeneralRe: Open Default Defragmenter Pin
andyr200524-Oct-07 9:08
andyr200524-Oct-07 9:08 
Questionvariable out of scope Pin
Payrok24-Oct-07 8:07
Payrok24-Oct-07 8:07 
AnswerRe: variable out of scope Pin
TJoe24-Oct-07 8:16
TJoe24-Oct-07 8:16 
AnswerRe: variable out of scope Pin
Guffa24-Oct-07 8:59
Guffa24-Oct-07 8:59 
AnswerRe: variable out of scope Pin
Pete O'Hanlon24-Oct-07 9:05
mvePete O'Hanlon24-Oct-07 9:05 

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.