TryCallMemberFunction() public method

Calls the function with the given name.
public TryCallMemberFunction ( object &result, object key ) : bool
result object The result of calling the function.
key object The name or symbol of the function to call.
return bool
コード例 #1
0
ファイル: ArrayInstance.cs プロジェクト: benliddicott/JS360
        public static string ToString(ObjectInstance thisObj)
        {
            // Try calling thisObj.join().
            object result;
            if (thisObj.TryCallMemberFunction(out result, "join") == true)
                return TypeConverter.ToString(result);

            // Otherwise, use the default Object.prototype.toString() method.
            return ObjectInstance.ToStringJS(thisObj.Engine, thisObj);
        }