November Happy Hour will be moved to Thursday December 5th.

Class PropertyFloatNumber

A property representing a floating point numeric value.

Inheritance
System.Object
PropertyFloatNumber
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 12.0.3
Syntax
public class PropertyFloatNumber : PropertyData, IReadOnly<PropertyData>, IReadOnly

Constructors

PropertyFloatNumber()

Initializes a new instance of the PropertyFloatNumber class.

Declaration
public PropertyFloatNumber()

PropertyFloatNumber(Double)

Initializes a new instance of the PropertyFloatNumber class.

Declaration
public PropertyFloatNumber(double numberValue)
Parameters
Type Name Description
System.Double numberValue

The number value.

Properties

FloatNumber

Get or sets the value of the property typed as a System.Double.

Declaration
public Nullable<double> FloatNumber { get; set; }
Property Value
Type Description
System.Nullable<System.Double>

The value of the property typed as a System.Double.

PropertyValueType

Gets the System.Type of the property value.

Declaration
public override Type PropertyValueType { get; }
Property Value
Type Description
System.Type

The System.Type of the property value.

Overrides

Type

Get the data type for this property.

Declaration
public override PropertyDataType Type { get; }
Property Value
Type Description
PropertyDataType

Returns FloatNumber.

Overrides
Remarks

The recommended practice is to use typeof() constructs instead of relying on this property.

Value

Gets or sets the value of the property.

Declaration
public override object Value { get; set; }
Property Value
Type Description
System.Object

The value of the property.

Overrides
Remarks

Value returns null if the property has no value defined.

Methods

Parse(String)

Create a new instance of PropertyFloatNumber from a string.

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

The string to create a PropertyFloatNumber from.

Returns
Type Description
PropertyFloatNumber

A new instance of PropertyFloatNumber.

Remarks

If the string is null or Empty an empty PropertyFloatNumber is returned. If the string cannot be parsed as a floating point number an InvalidPropertyValueException is thrown.

ParseToSelf(String)

Replace the internal floating point number with the parsed value.

Declaration
public override void ParseToSelf(string value)
Parameters
Type Name Description
System.String value

The string to parse into this object.

Overrides

SetDefaultValue()

Sets the default value for this property.

Declaration
protected override void SetDefaultValue()
Overrides

ToString()

Get the property's display string.

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

Implements

Extension Methods