WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Struct Length

    Show / Hide Table of Contents

    Struct Length

    Class for Length.

    Inherited Members
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    Namespace: Syncfusion.SVG.IO
    Assembly: Syncfusion.Diagram.Base.dll
    Syntax
    public struct Length

    Constructors

    Length(Single)

    Initializes a new instance of the Length struct.

    Declaration
    public Length(float value)
    Parameters
    Type Name Description
    System.Single value

    The value.

    Length(Single, LengthType)

    Initializes a new instance of the Length struct.

    Declaration
    public Length(float value, LengthType type)
    Parameters
    Type Name Description
    System.Single value

    The value.

    LengthType type

    The type.

    Length(String)

    Initializes a new instance of the Length struct.

    Declaration
    public Length(string value)
    Parameters
    Type Name Description
    System.String value

    The value.

    Properties

    Empty

    Gets the empty.

    Declaration
    public static Length Empty { get; }
    Property Value
    Type Description
    Length

    The empty.

    IsEmpty

    Gets a value indicating whether this instance is empty.

    Declaration
    public bool IsEmpty { get; }
    Property Value
    Type Description
    System.Boolean

    true if this instance is empty; otherwise, false.

    LengthRegex

    Gets the length regex.

    Declaration
    public static Regex LengthRegex { get; }
    Property Value
    Type Description
    System.Text.RegularExpressions.Regex

    The length regex.

    Primary

    Gets the primary.

    Declaration
    public string Primary { get; }
    Property Value
    Type Description
    System.String

    The primary.

    Type

    Gets the type.

    Declaration
    public LengthType Type { get; }
    Property Value
    Type Description
    LengthType

    The type.

    Value

    Gets the value.

    Declaration
    public float Value { get; }
    Property Value
    Type Description
    System.Single

    The value.

    Methods

    Equals(Object)

    Indicates whether this instance and a specified object are equal.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj

    Another object to compare to.

    Returns
    Type Description
    System.Boolean

    true if obj and this instance are the same type and represent the same value; otherwise, false.

    Overrides
    System.ValueType.Equals(System.Object)

    GetHashCode()

    Returns the hash code for this instance.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32

    A 32-bit signed integer that is the hash code for this instance.

    Overrides
    System.ValueType.GetHashCode()

    GetValue(Single)

    Gets the value.

    Declaration
    public float GetValue(float max)
    Parameters
    Type Name Description
    System.Single max

    The max.

    Returns
    Type Description
    System.Single

    The value.

    Parse(String)

    Parses the specified value.

    Declaration
    public static Length Parse(string value)
    Parameters
    Type Name Description
    System.String value

    The value.

    Returns
    Type Description
    Length

    The length.

    ToString()

    Returns the fully qualified type name of this instance.

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    A System.String containing a fully qualified type name.

    Overrides
    System.ValueType.ToString()

    Operators

    Explicit(Length to Single)

    Performs an explicit conversion from Length to System.Single.

    Declaration
    public static explicit operator float (Length length)
    Parameters
    Type Name Description
    Length length

    The length.

    Returns
    Type Description
    System.Single

    The result of the conversion.

    Implicit(Int32 to Length)

    Performs an implicit conversion from System.Int32 to Length.

    Declaration
    public static implicit operator Length(int value)
    Parameters
    Type Name Description
    System.Int32 value

    The value.

    Returns
    Type Description
    Length

    The result of the conversion.

    Implicit(Single to Length)

    Performs an implicit conversion from System.Single to Length.

    Declaration
    public static implicit operator Length(float value)
    Parameters
    Type Name Description
    System.Single value

    The value.

    Returns
    Type Description
    Length

    The result of the conversion.

    Implicit(String to Length)

    Performs an implicit conversion from System.String to Length.

    Declaration
    public static implicit operator Length(string value)
    Parameters
    Type Name Description
    System.String value

    The value.

    Returns
    Type Description
    Length

    The result of the conversion.

    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved