AvalonStudio.Projects.CPlusPlus.CPlusPlusClassHeaderTemplateBase.ToStringInstanceHelper.ToStringWithCulture C# (CSharp) Method

ToStringWithCulture() public method

This is called from the compile/run appdomain to convert objects within an expression block to a string
public ToStringWithCulture ( object objectToConvert ) : string
objectToConvert object
return string
            public string ToStringWithCulture(object objectToConvert)
            {
                if ((objectToConvert == null))
                {
                    throw new global::System.ArgumentNullException("objectToConvert");
                }
                System.Type t = objectToConvert.GetType();
                System.Reflection.MethodInfo method = t.GetMethod("ToString", new System.Type[] {
                            typeof(System.IFormatProvider)});
                if ((method == null))
                {
                    return objectToConvert.ToString();
                }
                else
                {
                    return ((string)(method.Invoke(objectToConvert, new object[] {
                                this.formatProviderField })));
                }
            }
        }
CPlusPlusClassHeaderTemplateBase.ToStringInstanceHelper