ByteQuantifiedSize.TryParse method (String, ByteQuantifiedSize.Quantifier, ByteQuantifiedSize)
Converts the string representation of a number with a specified unit into its byte-quantified size equivalent. A return value indicates whether the conversion succeeded or failed.
Namespace: Microsoft.Exchange.Data
Assembly: Microsoft.Exchange.Data (in Microsoft.Exchange.Data.dll)
Syntax
'Declaration
Public Shared Function TryParse ( _
expression As String, _
defaultUnit As ByteQuantifiedSize.Quantifier, _
<OutAttribute> ByRef byteQuantifiedSize As ByteQuantifiedSize _
) As Boolean
'Usage
Dim expression As String
Dim defaultUnit As ByteQuantifiedSize.Quantifier
Dim byteQuantifiedSize As ByteQuantifiedSize
Dim returnValue As Boolean
returnValue = ByteQuantifiedSize.TryParse(expression, _
defaultUnit, byteQuantifiedSize)
public static bool TryParse(
string expression,
ByteQuantifiedSize.Quantifier defaultUnit,
out ByteQuantifiedSize byteQuantifiedSize
)
Parameters
expression
Type: System.StringA string containing a number to convert.
defaultUnit
Type: Microsoft.Exchange.Data.ByteQuantifiedSize.QuantifierAn enumeration value that gives the unit.
byteQuantifiedSize
Type: Microsoft.Exchange.Data.ByteQuantifiedSizeWhen this method returns, this parameter contains the byte-quantified size equivalent to the number contained in the expression parameter if the conversion succeeded or zero if the conversion failed. The conversion fails if the expression parameter is a null reference (Nothing in Visual Basic), is not of the correct format, or represents a number less than the value of the MinValue field or greater than the value of the MaxValue field. This parameter is passed uninitialized.
Return value
Type: System.Boolean
true if the value of the expression parameter was converted successfully; otherwise, false.