Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Class PropertyFloatNumber

A property representing a floating point numeric value.

Inheritance
System.Object
PropertyFloatNumber
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 11.20.7
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 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.

ParseToObject(String)

A wrapper for Parse(String) to return a generic PropertyData object.

Declaration
[Obsolete("ParseToObject is no longer required to be implemented. The same functionality can be achieved by creating a new instance and calling the ParseToSelf method.")]
public override PropertyData ParseToObject(string value)
Parameters
Type Name Description
System.String value

The value for the new PropertyFloatNumber.

Returns
Type Description
PropertyData

A new instance of PropertyFloatNumber.

Overrides
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

EPiServer.Core.PropertyDataExtensions.TranslateDisplayName(EPiServer.Core.PropertyData)
EPiServer.Core.PropertyDataExtensions.TranslateDescription(EPiServer.Core.PropertyData)