Class CharFormatData
- Namespace
- SunamoData.Data
- Assembly
- SunamoData.dll
Specifies how the input text must be formatted.
public class CharFormatData
- Inheritance
-
CharFormatData
- Inherited Members
- Extension Methods
Constructors
CharFormatData()
Initializes a new instance of the CharFormatData class.
public CharFormatData()
CharFormatData(bool?, char[])
Initializes a new instance of the CharFormatData class.
public CharFormatData(bool? isUpper, char[] mustBe)
Parameters
isUpperbool?Whether characters must be uppercase (null = no matter).
mustBechar[]Array of allowed characters.
Properties
FromTo
Gets or sets the range specifying minimum and maximum length.
public FromTo FromTo { get; set; }
Property Value
IsUpper
Gets or sets whether characters must be uppercase. Null = no matter. Most suitable is the Windows.UI.Text.LetterCase enum.
public bool? IsUpper { get; set; }
Property Value
- bool?
MustBe
Gets or sets the array of characters that are allowed. May have no elements, then the character can be arbitrary.
public char[] MustBe { get; set; }
Property Value
- char[]
Methods
Get(bool?, FromTo, params char[])
Creates a CharFormatData instance with specified parameters.
public static CharFormatData Get(bool? isUpper, FromTo fromTo, params char[] mustBe)
Parameters
isUpperbool?Whether characters must be uppercase (null = no matter).
fromToFromToThe required length range.
mustBechar[]Array of allowed characters.
Returns
- CharFormatData
A configured CharFormatData instance.
GetOnlyNumbers(FromTo)
Creates a CharFormatData instance that accepts only numeric characters.
public static CharFormatData GetOnlyNumbers(FromTo requiredLength)
Parameters
requiredLengthFromToThe required length range.
Returns
- CharFormatData
A CharFormatData configured for numbers only.