Console Application for Threading using System.Threading in C# 1.1 and 2.0 (Dot Net)
Console Application for Threading using System.Threading in C# 1.1 and 2.0 (Dot Net)
// Console Application for Threading using System.Threading in C# 1.1 and 2.0 (Dot Net)
using System;
using System.Threading;
namespace Thred
{
class Thred
{
static void Main()
{
cs mt=new cs();
mt.t1=new Thread(new ThreadStart(mt.method1));
mt.t2=new Thread(new ThreadStart(mt.method2));
mt.t1.Start();
mt.t2.Start();
Console.ReadLine();
}
}
class cs
{
public Thread t1,t2;
public void method1()
{
for(int j=0;j<=20;j++)
{
Console.WriteLine("Thread1 "+ j);
Thread.Sleep(1000);
}
t2.Suspend();
t2.Resume();
}
public void method2()
{
t1.Suspend();
t1.Resume();
for(int i=0;i<=20;i++)
{
Console.WriteLine("Thread2 "+ i);
Thread.Sleep(2000);
}
}
}
}
-
Console Application for creating star pyramid using C# code
| By xxris | in Programming
Console Application for creating star pyramid using C# code...
-
Console Application using Structures (struct keyword) in C# 1.1 and 2.0 (Dot Net)
| By xxris | in Programming
Console Application using Structures (struct keyword) in C# 1.1 and 2.0 (Dot Net)...
-
Console Application using Operator Overload in C# 1.1 and 2.0 (Dot Net)
| By xxris | in Programming
Console Application using Operator Overload in C# 1.1 and 2.0 (Dot Net)...
-
Console Application for calling Event using Delegate in C# 1.1 and 2.0 (Dot Net)
| By xxris | in Programming
Console Application for calling Event using Delegate in C# 1.1 and 2.0 (Dot Net)...
-
XA Transaction - Solution for Transaction More Than One Database | By H4d1 | in Programming
Have you ever think that it's too difficult for making database transaction in two different places (or databases) ...
-
Javascript functions for : trim, right trim, left trim, no Apostrophe, is Empty , is Digit , VarChar To Number , is integer , check Is Zero , Get Que | By xxris | in Programming
Javascript functions for : trim, right trim, left trim, no Apostrophe, is Empty , is Digit , VarChar To Number , i...
-
How to access and use a Window's command line | By MaxwellPayne | in Programming
Learn about the Window's command line in DOS and how to use it....
-
How to Learn to Program Your Computer | By dsj8760 | in Programming
This article is about learning to program a computer. It is a general article giving tips on how to learn about pro...
-
Jailbroken iPhones get RickRolled | By explorer | in Programming
First iPhone worm, attacks via SSH and does the classic rick roll gag on the user....
-
Javascript functions for : trim, right trim, left trim, no Apostrophe, is Empty , is Digit , VarChar To Number , is integer , check Is Zero , Get Que | By xxris | in Programming
Javascript functions for : trim, right trim, left trim, no Apostrophe, is Empty , is Digit , VarChar To Number , i...
-
C# Code for Diagonal Addition of Two Matrix (Dotnet) | By xxris | in Programming
C# Code for Diagonal Addition of Two Matrix (Dotnet)...
-
C# Code for converting Digits to words from number 1 to 100099 (Dotnet) | By xxris | in Programming
This Program is For numbers less Than equal to 100099....
-
C# code for Transpose Of Matrix (C Sharp) ( Dot net) | By xxris | in Programming
C# code for Transpose Of Matrix (C Sharp) ( Dot net)...
-
Simple welcome and Console Print application in C# ( C sharp ) (Dot Net) | By xxris | in Programming
Simple welcome and Console Print application in C# ( C sharp ) (Dot Net)...








No comments yet.