Skip to content

Instantly share code, notes, and snippets.

@Krumelur
Created July 29, 2015 07:36
Show Gist options
  • Save Krumelur/c20cb3d3b4c44134311f to your computer and use it in GitHub Desktop.
Save Krumelur/c20cb3d3b4c44134311f to your computer and use it in GitHub Desktop.
using System;
using System.Threading.Tasks;
namespace TestOp
{
class MainClass
{
public static void Main (string[] args)
{
var foo = new foo();
foo.Run();
Console.ReadLine();
}
}
public class foo
{
string token;
public foo ()
{
this.token = "Initial Value";
}
void DoIt(string someString)
{
Console.WriteLine("SomeString is '{0}'", someString);
}
public void Run()
{
Action op = () => DoIt(this.token);
this.token = "Changed value";
op();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment