Last active
October 9, 2015 07:12
-
-
Save SMoni/905e6d30df92b34483e8 to your computer and use it in GitHub Desktop.
Simple Chaining... nothing more
This file contains 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
class Chain<T> { | |
private Chain() { } | |
private readonly List<T> _Chain = new List<T>(); | |
public static Chain<T> Start => new Chain<T>(); | |
public Chain<T> this[T This_] { | |
get { this._Chain.Add(This_); return this; } | |
} | |
public T[] End => this._Chain.ToArray(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment