Class StringConverter
Converts objects to string and backwards.
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Namespace: Loehnert.Lisrt.Modules.Configuration
Assembly: Loehnert.Lisrt.Modules.dll
Syntax
[Export(typeof(IStringConverter))]
public class StringConverter : IStringConverter
Remarks
For System.DateTime: See https://en.wikipedia.org/wiki/ISO_8601 For System.Nullable: "" and "null" (case insensitive) returns a null. For String with text "null": "null" is always text "null".
Methods
ConvertToObject(String, Type)
Declaration
public object ConvertToObject(string value, Type type)
Parameters
Type | Name | Description |
---|---|---|
String | value | Value as String. |
System.Type | type | Target type to convert. |
Returns
Type | Description |
---|---|
Object | An Object with the given value and System.Type. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown |
ConvertToString(Object)
Convert the value of an object to string.
Declaration
public string ConvertToString(object value)
Parameters
Type | Name | Description |
---|---|---|
Object | value | Any Object with value. |
Returns
Type | Description |
---|---|
String | String representing the value. |