System.Linq.Expressions.Strings.CannotCompileConstant C# (CSharp) Method

CannotCompileConstant() static private method

A string like "CompileToMethod cannot compile constant '{0}' because it is a non-trivial value, such as a live object. Instead, create an expression tree that can construct this value."
static private CannotCompileConstant ( object p0 ) : string
p0 object
return string
        internal static string CannotCompileConstant(object p0) => SR.Format(SR.CannotCompileConstant, p0);

Usage Example

 internal static Exception CannotCompileConstant(object p0)
 {
     return(new InvalidOperationException(Strings.CannotCompileConstant(p0)));
 }
Strings