Click here to Skip to main content
15,893,588 members
Home / Discussions / C#
   

C#

 
Generalaccessing the Active Directory is giving an error message which is "Insufficient memory " Pin
rozhanin6-Mar-08 1:39
rozhanin6-Mar-08 1:39 
GeneralBuild An Assembly Pin
razanabanu6-Mar-08 1:19
razanabanu6-Mar-08 1:19 
GeneralRe: Build An Assembly Pin
Pete O'Hanlon6-Mar-08 1:28
mvePete O'Hanlon6-Mar-08 1:28 
GeneralRe: Build An Assembly Pin
razanabanu6-Mar-08 1:31
razanabanu6-Mar-08 1:31 
GeneralRe: Build An Assembly Pin
Pete O'Hanlon6-Mar-08 1:57
mvePete O'Hanlon6-Mar-08 1:57 
GeneralRe: Build An Assembly Pin
Lutosław6-Mar-08 6:54
Lutosław6-Mar-08 6:54 
GeneralDifferences in Invoke() Pin
stancrm6-Mar-08 0:46
stancrm6-Mar-08 0:46 
GeneralRe: Differences in Invoke() Pin
Robert Rohde6-Mar-08 1:24
Robert Rohde6-Mar-08 1:24 
Hi,

first of all I think you have choosen a bad example. When receiving a Click event of a button it is clear it will be in the same thread as the container was created in.
Now to your question:
Invoke delegates a call into the thread the control was created in. This is necessary as Windows can react in confusing ways when it is not done. The InvokeRequired version will only do this when it is necessary. If the caller is already in the correct thread it will return false and thus call the method normally. As Invoke is rather expensive compared to a normal method call this might give you a performance benefit. But if you are sure that it is always needed the extra InvokeRequired call might also reduce performance.

Robert
GeneralInvalidOperationException Pin
satheesh.yuva6-Mar-08 0:32
satheesh.yuva6-Mar-08 0:32 
GeneralRe: InvalidOperationException Pin
Gareth H6-Mar-08 2:08
Gareth H6-Mar-08 2:08 
GeneralREG_SZ String Value Pin
mjmim6-Mar-08 0:24
mjmim6-Mar-08 0:24 
GeneralRe: REG_SZ String Value Pin
led mike6-Mar-08 4:49
led mike6-Mar-08 4:49 
GeneralRe: REG_SZ String Value Pin
mjmim6-Mar-08 12:02
mjmim6-Mar-08 12:02 
Questionc# matrix problem Pin
nrg2225-Mar-08 23:25
nrg2225-Mar-08 23:25 
GeneralRe: c# matrix problem Pin
Christian Graus5-Mar-08 23:51
protectorChristian Graus5-Mar-08 23:51 
GeneralWrapper Creation Pin
Rahul.RK5-Mar-08 23:21
Rahul.RK5-Mar-08 23:21 
GeneralCross Post Pin
led mike6-Mar-08 4:51
led mike6-Mar-08 4:51 
General[Message Deleted] Pin
mohit ag5-Mar-08 23:06
mohit ag5-Mar-08 23:06 
GeneralRe: check for special charachter Pin
Christian Graus5-Mar-08 23:21
protectorChristian Graus5-Mar-08 23:21 
GeneralRe: check for special charachter Pin
Giorgi Dalakishvili5-Mar-08 23:24
mentorGiorgi Dalakishvili5-Mar-08 23:24 
GeneralRe: check for special charachter Pin
Christian Graus5-Mar-08 23:49
protectorChristian Graus5-Mar-08 23:49 
GeneralRe: check for special charachter Pin
Pete O'Hanlon6-Mar-08 5:18
mvePete O'Hanlon6-Mar-08 5:18 
GeneralAutomatic Properties Pin
GChannon5-Mar-08 22:58
GChannon5-Mar-08 22:58 
GeneralRe: Automatic Properties Pin
Christian Graus5-Mar-08 23:04
protectorChristian Graus5-Mar-08 23:04 
GeneralRe: Automatic Properties Pin
Robert Rohde6-Mar-08 1:18
Robert Rohde6-Mar-08 1:18 

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.