Created
October 7, 2015 12:37
-
-
Save reslea/232a284429a91879287f to your computer and use it in GitHub Desktop.
MethodBuilder
This file contains hidden or 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; | |
| 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