Error!
Success!

Parse and TryParse methods should be signatures in a interface, IParse

0
kicks

Parse and TryParse methods should be signatures in a interface, IParse  (Unpublished)

Useful as this pattern is, the Parse and TryParse method signatures are not inherited from an interface in .NET. Why isn’t there an IParse interface that defines these two methods? Who knows. The interface could have existed since the inception of .NET, but it hasn’t. And in .NET 2.0 and later, generics could be used to eliminate the boxing that is required in .NET 1.1. Here’s what the simple interface should look like, defined in the System namespace.


Kicked By:
Drop Kicked By: