PersistentSettingsConverter
Used to convert string to string lists and string dictionaries and back to strings again.
Methods
Determines if the string value is formatted as a key value pair string list.
Parameters:
| s (string) | String to check |
Returns: Returns true if it is a XML key value pair list otherwise return false.
Determines if the string value is formatted as a string list.
Parameters:
| s (string) | String to check |
Returns: Returns true if it is a XML string list otherwise return false.
Converts a double value to a string.
Parameters:
| value (double) | double value |
Returns: Returns the double value as a settings file formatted string.
ToString
#Converts a key value string pair array to a properly formatted string dictionary XML string.
Parameters:
| value (KeyValuePair<string, string>[]) | List of string pairs to turn into a dictionary XML string. |
Returns: Returns a properly formatted XML string that represents the string dictionary.
Converts a string array to a properly formatted string list XML string.
Parameters:
| values (string[]) | List of strings to turn into a string list XML string. |
Returns: Returns a properly formatted XML string that represents the list of strings.
Converts the string representation of a number to its double-precision floating-point number equivalent. A return value indicates whether the conversion succeeded or failed. system culture.
Parameters:
| s (string) | A string containing a number to convert. |
| value (out double) | When this method returns, contains the double-precision floating-point number equivalent of the s parameter, if the conversion succeeded, or zero if the conversion failed. The conversion fails if the s parameter is null or Empty, is not a number in a valid format, or represents a number less than MinValue or greater than MaxValue. This parameter is passed uninitialized; any value originally supplied in result will be overwritten. |
Returns: Returns true if s was converted successfully; otherwise, false..
Converts an enumerated value name to its integer equivalent.
Converts an enumerated value string (integer as string) to a enumerated value name.
TryParseStringDictionary
#Attempts to convert a string to a key value string pair array.
Parameters:
| s (string) | String to parse |
| value (out KeyValuePair<string, string>[]) | Result will get copied here, if the string is null or empty then this will be an empty array, if there was an error parsing then this will be null otherwise it will be the string parsed as a key value string pair array. |
Returns: Returns true if the string is not empty and properly formatted as a key value string pair list otherwise returns false.
Attempts to convert a string to a string value list.
Parameters:
| s (string) | String to parse |
| value (out string[]) | Result will get copied here, if the string is null or empty then this will be an empty list, if there was an error parsing then this will be null otherwise it will be the string parsed as a list. |
Returns: Returns true if the string is not empty and properly formatted as a string list otherwise returns false.