Catel.ObjectToStringHelper.ToString C# (CSharp) Метод

ToString() публичный статический Метод

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.
Результат string
        public static string ToString(object instance)
        {
            return ToString(instance, DefaultCulture);
        }

Same methods

ObjectToStringHelper::ToString ( object instance, CultureInfo cultureInfo ) : string

Usage Example

Пример #1
0
 public static void IsNotNull(string paramName, object paramValue)
 {
     if (paramValue == null)
     {
         Log.Error("Argument '{0}' cannot be null", ObjectToStringHelper.ToString(paramName));
         throw new ArgumentNullException(paramName);
     }
 }
All Usage Examples Of Catel.ObjectToStringHelper::ToString