Created
January 19, 2012 08:49
-
-
Save wujiwh/1638839 to your computer and use it in GitHub Desktop.
sageTest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading; | |
namespace @delegate | |
{ | |
static class Program | |
{ | |
public delegate int TakesAWhileDelegate(int data, int ms); | |
static int TakesAWhile(int data, int ms) | |
{ | |
Console.WriteLine("Takes a while start"); | |
Thread.Sleep(ms); | |
Console.WriteLine("\nTakes a while completed"); | |
return ++data; | |
} | |
/// <summary> | |
/// The main entry point for the application. | |
/// </summary> | |
static void Main() | |
{ | |
new Thread(TakesAWhileDelegate(10, 1000) => | |
{ | |
}).Start(); | |
Console.WriteLine("Hello World"); | |
Console.Read(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment