Ist diese C# -Programm-Thread-Sicherheit [Duplikat]C#

Ein Treffpunkt für C#-Programmierer
Anonymous
 Ist diese C# -Programm-Thread-Sicherheit [Duplikat]

Post by Anonymous »

Dieser Beitrag unten habe ich gelesen, aber er hat nicht verwandt.

Code: Select all

namespace helloworld
{
internal class Program
{
static void Main()
{
int foo =0;

var t = new Thread(() =>
{
foo++;
} );
t.Start();
t.Join();
Console.WriteLine(foo);
}
}

}

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post