Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# change label from thread

  private void DoOnUI()
        {
            string text = "something";
            if (this.label1.InvokeRequired)
            {
                this.label1.BeginInvoke((MethodInvoker)delegate () { this.label1.Text = text; });
            }
            else
            {
                this.label1.Text = text;
            }
        }
Comment

PREVIOUS NEXT
Code Example
Csharp :: linear search c# 
Csharp :: callback function on animation end unity 
Csharp :: hello world in unity c# 
Csharp :: unity action example 
Csharp :: winforms C# code cross thread operation is not valid 
Csharp :: find genre of song 
Csharp :: c# how to fill a datatable 
Csharp :: c# add to array 
Csharp :: CS0101 Unity Error Code 
Csharp :: unity button press 
Csharp :: unity instantiate prefab 
Csharp :: c# serial port 
Csharp :: c# swtich 
Csharp :: c# see if string is int 
Csharp :: c# datagridview change selected row color 
Csharp :: c# generate unique key 
Csharp :: single line and multiline comments in c 
Csharp :: how to remove white spaces from string in c# 
Csharp :: array in c# stack overflow 
Csharp :: c# load form 
Csharp :: unity setparent 
Csharp :: c# distinct array of objects by values 
Csharp :: unity create 3d object in script 
Csharp :: c# file watcher 
Csharp :: datetime month name 
Csharp :: how to concert a list into strinf splitted by coma c# 
Csharp :: how to get current dir in c# 
Csharp :: how to get a length of a string in c# 
Csharp :: unity yield return 
Csharp :: decrease image size C# 
ADD CONTENT
Topic
Content
Source link
Name
2+8 =