Typically you simply give the methods different names.
An example of this is IDataReader
with GetInt32
, GetInt64
etc.
To be honest, I believe this usually makes it clearer what you're trying to do anyway - particularly if you're then calling an overloaded method with the result:
Console.WriteLine(reader.GetInt32()); // This is clear
Console.WriteLine(foo.OverloadedGet()); // Which overload of OverloadedGet?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…