Skip to content

Instantly share code, notes, and snippets.

@wujiwh wujiwh/sageTest.cs

Created Jan 19, 2012
What would you like to do?
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");
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) =>
Console.WriteLine("Hello World");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.