CodeCharge Studio All C#.NET VB.NET

FieldBase Class (.NET)

Serves as the base class that defines the properties, methods, and events common for all types of Field classes (TextField, MemoField, BooleanField, IntegerField, FloatField and DateField).

Constructors

Property Description
public FieldBase(string format) Initializes a new instance of the Field class and sets Format property.
public FieldBase(string format, object defaultValue) Initializes a new instance of the Field class and sets Format property and Value property.

Properties

Property Description
public object Value get or set value of field
public string Format Gets or sets a format mask, which is used in SetValue and Get Formatted Value methods.

Methods

Property Description
public virtual string GetFormattedValue() Convert to string and return Value of object, used mask, specified in Format property
public virtual string GetFormattedValue(string format) Convert to string and return Value of object, used mask, specified by format parameter
public virtual void SetValue(object value) Sets Value property of a object. If value can not be converted to target type, use Format property mask to parse it.
public virtual void SetValue(object value,string format) Sets Value property of a object. If value can not be converted to target type, use Format method mask to parse it.


On-line, printable versions and updates