Gemstone Common Library
Show/Hide TOC

# LengthParse(String) Method

Converts the string representation of a number to its Length equivalent.

## Definition

Namespace: Gemstone.Units
Assembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.173 -- Release Build+298e1c238b074757f82f41812034645402a162ed
C#
View Source Request Example

    public static Length Parse(
    	string s
    )

VB
View Source Request Example

    Public Shared Function Parse (
    	s As String
    ) As Length

C++
View Source Request Example

    public:
    static Length Parse(
    	String^ s
    )

JavaScript
View Source Request Example

    Gemstone.Units.Length.Parse = function(s);

#### Parameters

s String
  A string containing a number to convert.

#### Return Value

Length
A Length equivalent to the number contained in s.

## Exceptions

ArgumentNullException | s is null.
OverflowException | s represents a number less than MinValue or greater than MaxValue.
FormatException | s is not in the correct format.

## See Also

#### Reference

Length Structure
Parse Overload
Gemstone.Units Namespace