You can promote the Single Resposibility Principle with extension methods. For this example, forget we have System.Convert
in the BCL:
namespace System
{
public struct Int32
{
...
// an int should know nothing about a decimal or how to convert to it
public decimal ConvertToDecimal()
{ ... }
}
}
namespace System
{
public struct Int32
{ ... }
}
namespace System.ConversionExtensions
{
public static class Int32ConversionExtensions
{
public static decimal ToDecimal(this int num)
{ ... }
}
}