Struct Unit
Namespace: Aurigma.DesignAtoms.Convert.Unit
Assembly: Aurigma.DesignAtoms.dll
Syntax
public struct Unit
Inherited Members
System.Object.Equals(System.Object,System.Object)System.Object.ReferenceEquals(System.Object,System.Object)System.Object.GetType
Constructors
Unit
public Unit(int value)
Unit
public Unit(double value)
Unit
public Unit(double value, UnitType type)
Unit
public Unit(string value)
Unit
public Unit(string value, CultureInfo culture)
Properties
Value
public readonly double Value { get; }
IsEmpty
public readonly bool IsEmpty { get; }
Type
public readonly UnitType Type { get; }
Methods
Parse
public static Unit Parse(string s)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | s |
Returns
Aurigma.DesignAtoms.Convert.Unit.Unit
Parse
public static Unit Parse(string s, CultureInfo culture)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | s | |
System.Globalization.CultureInfo | culture |
Returns
Aurigma.DesignAtoms.Convert.Unit.Unit
Percentage
public static Unit Percentage(double n)
Parameters
| Type | Name | Description |
|---|---|---|
System.Double | n |
Returns
Aurigma.DesignAtoms.Convert.Unit.Unit
Pixel
public static Unit Pixel(int n)
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | n |
Returns
Aurigma.DesignAtoms.Convert.Unit.Unit
Point
public static Unit Point(int n)
Parameters
| Type | Name | Description |
|---|---|---|
System.Int32 | n |
Returns
Aurigma.DesignAtoms.Convert.Unit.Unit
ToString
public string ToString(CultureInfo culture)
Parameters
| Type | Name | Description |
|---|---|---|
System.Globalization.CultureInfo | culture |
Returns
System.String
ToString
public string ToString(IFormatProvider formatProvider)
Parameters
| Type | Name | Description |
|---|---|---|
System.IFormatProvider | formatProvider |
Returns
System.String
Equals
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
System.Object | obj |
Returns
System.Boolean
Overrides
System.ValueType.Equals(System.Object)
GetHashCode
public override int GetHashCode()
Returns
System.Int32
Overrides
System.ValueType.GetHashCode
ToString
public override string ToString()
Returns
System.String
Overrides
System.ValueType.ToString
Fields
Empty
public static readonly Unit Empty