I definitely prefer the name ThingExtensions
over IThingExtensions
. The reason being that to most programmers an I
prefix on a type implies that it is an interface. This is both a very common pattern and part of the .Net Design Guidelines.
Adding an I
prefix for the extension method case breaks both assumptions and established guidelines.
There is also precedence for this in the Base Class Library. The majority of the extension methods available for IEnumerable
are contained in the type Enumerable
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…