Skip to content

Instantly share code, notes, and snippets.

@fschwiet
Created August 25, 2011 22:12
Show Gist options
  • Save fschwiet/1172142 to your computer and use it in GitHub Desktop.
Save fschwiet/1172142 to your computer and use it in GitHub Desktop.
learned something C# & new today
public class Class1 : IEnumerable
{
public void can_use_creation_shorthand_with_arbitrary_class_supporting_Add()
{
var hmm = new Class1()
{
{1,2},
{3,4}
};
}
public void Add(int a, int b)
{
throw new NotImplementedException();
}
public IEnumerator GetEnumerator()
{
throw new NotImplementedException();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment