Click here to Skip to main content
15,891,423 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# hidden files Pin
Richard Andrew x6421-Oct-12 12:07
professionalRichard Andrew x6421-Oct-12 12:07 
GeneralRe: C# hidden files Pin
rachel_m21-Oct-12 13:28
rachel_m21-Oct-12 13:28 
AnswerRe: C# hidden files Pin
Richard Andrew x6421-Oct-12 14:17
professionalRichard Andrew x6421-Oct-12 14:17 
GeneralRe: C# hidden files Pin
jschell22-Oct-12 8:04
jschell22-Oct-12 8:04 
Questionwhats delegate? Pin
mhd.sbt19-Oct-12 8:29
mhd.sbt19-Oct-12 8:29 
AnswerRe: whats delegate? Pin
fjdiewornncalwe19-Oct-12 8:36
professionalfjdiewornncalwe19-Oct-12 8:36 
GeneralRe: whats delegate? Pin
mhd.sbt19-Oct-12 8:58
mhd.sbt19-Oct-12 8:58 
GeneralRe: whats delegate? Pin
fjdiewornncalwe19-Oct-12 9:05
professionalfjdiewornncalwe19-Oct-12 9:05 
AnswerRe: whats delegate? Pin
Mycroft Holmes19-Oct-12 13:37
professionalMycroft Holmes19-Oct-12 13:37 
QuestionTextbox to enter only alphabet on key press Pin
ks.vignesh19-Oct-12 0:10
ks.vignesh19-Oct-12 0:10 
AnswerRe: Textbox to enter only alphabet on key press Pin
Wes Aday19-Oct-12 0:44
professionalWes Aday19-Oct-12 0:44 
Answer1 vote Pin
BobJanova19-Oct-12 2:33
BobJanova19-Oct-12 2:33 
AnswerMy Vote of 1 Pin
Keith Barrow19-Oct-12 4:32
professionalKeith Barrow19-Oct-12 4:32 
QuestionHow to turn off projectors in c# Pin
ravindervilasagar18-Oct-12 23:50
ravindervilasagar18-Oct-12 23:50 
AnswerRe: How to turn off projectors in c# Pin
Pete O'Hanlon19-Oct-12 0:26
mvePete O'Hanlon19-Oct-12 0:26 
QuestionHow To Determine the strings language Pin
mohammadkaab18-Oct-12 6:26
mohammadkaab18-Oct-12 6:26 
AnswerRe: How To Determine the strings language Pin
Eddy Vluggen18-Oct-12 6:30
professionalEddy Vluggen18-Oct-12 6:30 
AnswerRe: How To Determine the strings language Pin
jschell18-Oct-12 9:34
jschell18-Oct-12 9:34 
AnswerRe: How To Determine the strings language Pin
Richard Deeming18-Oct-12 10:53
mveRichard Deeming18-Oct-12 10:53 
QuestionNeeding help with threads and delegates Pin
turbosupramk318-Oct-12 5:00
turbosupramk318-Oct-12 5:00 
AnswerRe: Needing help with threads and delegates Pin
BobJanova18-Oct-12 5:48
BobJanova18-Oct-12 5:48 
GeneralRe: Needing help with threads and delegates Pin
turbosupramk318-Oct-12 6:16
turbosupramk318-Oct-12 6:16 
GeneralRe: Needing help with threads and delegates Pin
BobJanova18-Oct-12 6:58
BobJanova18-Oct-12 6:58 
If you set IsBackground, the worker thread will be killed when the main form is closed. That will solve the invoke-on-disposed-control issue but it is sometimes not what you want.

Delegates are simply typed function pointers. They are typically used to hook to events, which are some syntactic niceness around multicast delegates (i.e. the code calls what looks like one function, and several handler functions are run). They don't have anything directly to do with multithreading. Examples of non-threaded delegate usage include such obvious things as Click handlers on buttons (and all other UI events).

However, the way the Framework exposes threading functionality is either through Thread or BackgroundWorker. Thread takes a delegate to specify the method that should be run, and BackgroundWorker has several events which you can hook delegates onto.


turbosupramk3 wrote:
It appears to have the ability to insert an item into the main form thread queue of what it is doing. Is that correct?

This is a decent description of the purpose of the Invoke or BeginInvoke methods. They ask the relevant thread to run a method (specified by a delegate) when appropriate.
AnswerRe: Needing help with threads and delegates Pin
Eddy Vluggen18-Oct-12 6:17
professionalEddy Vluggen18-Oct-12 6:17 
GeneralRe: Needing help with threads and delegates Pin
turbosupramk318-Oct-12 6:24
turbosupramk318-Oct-12 6:24 

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.