Yes and no. That's syntactic sugar that should not really live in an interface IMO (forces implementors to deal with it). You could do that via a static method in a helper class (ideally in the interface itself, but interfaces cannot have static methods.)