Class StringConverter
- Namespace
- Loehnert.Lisrt.Modules.Configuration
- Assembly
- Loehnert.Lisrt.Modules.dll
Converts objects to string and backwards.
[Export(typeof(IStringConverter))]
public class StringConverter : IStringConverter
- Inheritance
-
StringConverter
- Implements
- Inherited Members
- Extension Methods
Remarks
For DateTime: See https://en.wikipedia.org/wiki/ISO_8601 For Nullable: "" and "null" (case insensitive) returns a null. For string with text "null": "null" is always text "null".
Methods
ConvertToObject(string, Type)
public object ConvertToObject(string value, Type type)
Parameters
Returns
Exceptions
- ArgumentNullException
Thrown
value
ortype
is null.
ConvertToString(object)
Convert the value of an object to string.
public string ConvertToString(object value)