Skip to content

Instantly share code, notes, and snippets.

@SMoni
Last active October 9, 2015 07:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SMoni/905e6d30df92b34483e8 to your computer and use it in GitHub Desktop.
Save SMoni/905e6d30df92b34483e8 to your computer and use it in GitHub Desktop.
Simple Chaining... nothing more
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