C# Class Catel.ObjectToStringHelper

Simple static class that turns an object to string.
Show file Open project: Catel/Catel Class Usage Examples

Public Methods

Method Description
ToFullTypeString ( object instance ) : string

Returns a string that represents the full type name of the instance. If the instance is null, this method will return "null". This method is great when the value of a property must be logged.

ToString ( object instance ) : string

Returns a string that represents the instance. If the instance is null, this method will return "null". This method is great when the value of a property must be logged.

ToString ( object instance, CultureInfo cultureInfo ) : string

Returns a string that represents the instance. If the instance is null, this method will return "null". This method is great when the value of a property must be logged.

ToTypeString ( object instance ) : string

Returns a string that represents the type name of the instance. If the instance is null, this method will return "null". This method is great when the value of a property must be logged.

Private Methods

Method Description
ObjectToStringHelper ( ) : System

Initializes static members of the StringToObjectHelper class.

Method Details

ToFullTypeString() public static method

Returns a string that represents the full type name of the instance. If the instance is null, this method will return "null". This method is great when the value of a property must be logged.
public static ToFullTypeString ( object instance ) : string
instance object The instance.
return string

ToString() public static method

Returns a string that represents the instance. If the instance is null, this method will return "null". This method is great when the value of a property must be logged.
public static ToString ( object instance ) : string
instance object The instance, can be null.
return string

ToString() public static method

Returns a string that represents the instance. If the instance is null, this method will return "null". This method is great when the value of a property must be logged.
public static ToString ( object instance, CultureInfo cultureInfo ) : string
instance object The instance, can be null.
cultureInfo CultureInfo The culture information.
return string

ToTypeString() public static method

Returns a string that represents the type name of the instance. If the instance is null, this method will return "null". This method is great when the value of a property must be logged.
public static ToTypeString ( object instance ) : string
instance object The instance.
return string