Skip to content

Instantly share code, notes, and snippets.

@reslea
Created October 7, 2015 12:37
Show Gist options
  • Select an option

  • Save reslea/232a284429a91879287f to your computer and use it in GitHub Desktop.

Select an option

Save reslea/232a284429a91879287f to your computer and use it in GitHub Desktop.
MethodBuilder
using System;
public class Program
{
public static void Main()
{
Method<int>().To<string>();
}
public static MethodBuilder<TFirst> Method<TFirst>()
{
return new MethodBuilder<TFirst>();
}
}
public class MethodBuilder<TFirst>
{
public void To<TSecond>()
{
Console.WriteLine("Type is created with TFirst {0} and TSecond {1}", typeof(TFirst).Name, typeof(TSecond).Name);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment