It’s the little things

July 17th, 2008

A while ago, I wrote a blog post regarding Test Data Builders Refined. Earlier this week, I wrote a very simple base class that provides an implicit cast operator for the builder class:

public abstract class TestDataBuilder<TSubject> { public abstract TSubject Build(); public static implicit operator TSubject(TestDataBuilder builder) { return builder.Build(); } }

Even I can’t get it more complex than this :-) .

Jan Van Ryswyck

  • http://davybrion.com Davy Brion

    ohh, very nice :)

  • http://www.arjansworld.com/2008/07/18/linkblog-for-july-18-2008/ Arjan`s World » LINKBLOG for July 18, 2008

    [...] It’s the little things – Jan van Ryswyk small code tip ‘ a very simple base class that provides an implicit cast operator for the builder class ‘ [...]

blog comments powered by Disqus