Class PropertyFloatNumber
A property representing a floating point numeric value.
Inherited Members
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 9.12.2Syntax
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.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
CreatePropertyControl()
Creates a PropertyNumberControl that is used to display a user interface for the property.
Declaration
public override IPropertyControl CreatePropertyControl()
Returns
Type | Description |
---|---|
IPropertyControl | A PropertyNumberControl that is used to display a user interface for the property. |
Overrides
Remarks
It is possible to change which control should be used by registering a different IPropertyControl for the PropertyData class in PropertyControlClassFactory.
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
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 |