Version

CalcDefaultDoubleMask(IFormatProvider,Int32,Int32,Char) Method

Calculates the default mask for double mask based on the CultureInfo
Syntax
'Declaration
 
Public Overloads Shared Function CalcDefaultDoubleMask( _
   ByVal formatProvider As IFormatProvider, _
   ByVal integerDigits As Integer, _
   ByVal fractionDigits As Integer, _
   ByVal allowNegatives As Char _
) As String
public static string CalcDefaultDoubleMask( 
   IFormatProvider formatProvider,
   int integerDigits,
   int fractionDigits,
   char allowNegatives
)

Parameters

formatProvider
Format provider to use to construct a default mask with. Can be a CultureInfo or a NumberFormatInfo.
integerDigits
Number of digits in integer section. -1 means use a default. Can be 0 in which case there won't be an integer portion.
fractionDigits
Number of digits in fraction section. -1 means use one specified by culture info. Can be 0 in which case there won't be fraction section.
allowNegatives
If '-' or '+' then negative numbers are allowed. '-' specifies that the minus sign should be displayed only when the number is negative. '+' specifies that the plus or minus sign will always be displayed depending on whther the number is negative or positive. If this parameter is any other character then it's ignored.

Return Value

The default mask for a double type.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also