Format:
Recent snippets for: InfinitiesLoop
Foo foo1 = new Foo(), foo2 = new Foo(), foo3 = new Foo(), foo4 = new Foo(); foo1.Foos = new List<Foo> { foo2 }; foo2.Foos = new List<Foo> { foo2, foo3, foo4 }; var list = new List<Foo> { foo1, foo2 };
167 Views
no comments
// la la la if (foo is ISomeInterface) { ((ISomeInterface)foo).SomeMethod(); } else if (foo is ISomeOtherInterface) { ((ISomeOtherInterface)foo).SomeMethod(); } else { throw new SomeException();
336 Views
2 comments
// If you have a lot of objects with structure to create, // the code can really add up. // var a = { a: 1, b: 2, c: 3 }, // b = { a: 4, b: 5, c: 6 }, etc.. // Especially if the field names (e.g. a, b, c) // are long. Even when minified, these field names remain. // Sacrificing a bit of performance, the script can be // much more concise if we use a generic creation helper.
249 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
