Collapse All Expand All

C#

Oracle® Coherence .NET API Reference
XmlHelper..::.ParseMemorySize Method (String)
XmlHelper Class See Also Send Feedback

Oracle® Coherence .NET API Reference Release 3.6
E15727-01
Parse the given string representation of a number of bytes.

Namespace: Tangosol.Run.Xml
Assembly: Coherence (in Coherence.dll) Version: 3.6.0.0 (3.6.0.0)

# Syntax

C#
    public static long ParseMemorySize(
    	string s
    )

#### Parameters

s
  Type: System..::.String
  A string with the format [\d]+[[.][\d]+]?[K|k|M|m|G|g|T|t]?[B|b]?

#### Return Value

The number of bytes represented by the given string.

# Remarks

The supplied string must be in the format:

[\d]+[[.][\d]+]?[K|k|M|m|G|g|T|t]?[B|b]?

where the first non-digit (from left to right) indicates the factor with which the preceeding decimal value should be multiplied:

- K or k (kilo, 210)
- M or m (mega, 220)
- G or g (giga, 230)
- T or t (tera, 240)

If the string value does not contain a factor, a factor of one is assumed.

The optional last character B or b indicates a unit of bytes.

# See Also

XmlHelper Class
ParseMemorySize Overload
Tangosol.Run.Xml Namespace