You cannot specify optional parameters in C# prior to C# 4.0.
http://msdn.microsoft.com/en-gb/library/dd264739.aspx[
^]
Instead, you can provide an overloaded method which accepts the other parameters and calls the other method using the required default. Thus:
private string formatSizeBinary(Int64 size, Int32 decimals)
{
}
private string formatSizeBinary(Int64 size)
{
return formatSizeBinary(size, 2)
}
Regards,
Ian.