Skip to content

Instantly share code, notes, and snippets.

@codereflection
Created November 4, 2010 19:22
Show Gist options
  • Select an option

  • Save codereflection/663016 to your computer and use it in GitHub Desktop.

Select an option

Save codereflection/663016 to your computer and use it in GitHub Desktop.
out refs suck.
using System;
using System.IO;
namespace OutRefsSuck
{
internal static class Program
{
private static void CallSomeFunction(string value1, string value2, Action<string> doneAction)
{
doneAction(value1 + value2);
}
private static void Main(string[] args)
{
CallSomeFunction("Hello, ", "Mr. Miyagi", x => Console.WriteLine("Concating two strings: {0}", x));
Console.ReadKey();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment