log4net SDK Reference

OptionConverter.ToFileSize Method 

Parses a file size into a number.

[Visual Basic]
Public Shared Function ToFileSize( _
   ByVal argValue As String, _
   ByVal defaultValue As Long _
) As Long
[C#]
public static long ToFileSize(
   string argValue,
   long defaultValue
);

Parameters

argValue
String to parse.
defaultValue
The default value.

Return Value

The Int64 value of argValue.

Remarks

Parses a file size of the form: number[KB|MB|GB] into a long value. It is scaled with the appropriate multiplier.

defaultValue is returned when argValue cannot be converted to a Int64 value.

See Also

OptionConverter Class | log4net.Util Namespace