here is code for running threads in c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System;
using System.Threading;
namespace create_thread
{
class Program
{
public delegate void ThreadStart();
static void Main(string[] args)
{
Thread t=new Thread(new ThreadStart(Go));
t.Start();
Go();
}
static void Go()
{
Console.WriteLine("hello");
}
}
}
but here is errors
------ Build started: Project: create_thread, Configuration: Debug x86 ------
c:\users\7\documents\visual studio 2010\Projects\create_thread\create_thread\Program.cs(5,7): warning CS0105: The using directive for 'System' appeared previously in this namespace
c:\users\7\documents\visual studio 2010\Projects\create_thread\create_thread\Program.cs(17,22): error CS1502: The best overloaded method match for 'System.Threading.Thread.Thread(System.Threading.ThreadStart)' has some invalid arguments
c:\users\7\documents\visual studio 2010\Projects\create_thread\create_thread\Program.cs(17,33): error CS1503: Argument 1: cannot convert from 'create_thread.Program.ThreadStart' to 'System.Threading.ThreadStart'
Compile complete -- 2 errors, 1 warnings
Build started 10/25/2010 10:25:40 PM.
ResolveAssemblyReferences:
A TargetFramework profile exclusion list will be generated.
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
CoreCompile:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /platform:x86 /errorreport:prompt /warn:4 /define:DEBUG;TRACE /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\Microsoft.CSharp.dll" /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\mscorlib.dll" /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Core.dll" /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Data.dll" /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.dll" /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Xml.dll" /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Xml.Linq.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\x86\Debug\create_thread.exe /target:exe Program.cs Properties\AssemblyInfo.cs "C:\Users\7\AppData\Local\Temp\.NETFramework,Version=v4.0,Profile=Client.AssemblyAttributes.cs"
Build FAILED.
Time Elapsed 00:00:00.30
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========
please help