Suppose I have a MainForm form and a control: somelabel. To access these controls from another thread, I have to use the Invoke method. eg:
somelabel.Invoke(...);
However, I can also access the shortcut through a form like this:
MainForm.Invoke(...) //Code for manipulating somelabel
Is there a difference between the two snippets in terms of performance or some other technical aspect?
. Windows Invoke, . , ( ), , .
. , , , . - WindowsFormsSynchronizationContext, SynchronizationContext.Current. , ( Send/Post Invoke), , any.
... , . , , , . , - , , .
, , , (, , , ). , , , , .
Source: https://habr.com/ru/post/1730273/More articles:iPhone, Mobile Safari, YouTube ... stay on page - iphoneHide columns in Flex table - flexNative sdk function for scaling a bitmap? - androidNHibernate + Unable to insert null value in - nhibernateComputing a template in dynamic_cast - c ++Use an array of Matlab cells in a C / C ++ program - c ++how to find out when NSData initWithContentsOfURL finished loading. - iphoneDo you have a PHP profiling class? - profilingSetting an Excel range using an array using Python and comtypes? - pythonDICOMDIR tool / script to create - dicomAll Articles