Example #1
0
		} } // StringConstructorObj
	
	
	// Implementation for calling the String constructor as a function.
	// "When String is called as a function rather than as a constructor,
	// it performs a type conversion."
	private static object StringConstructorFunction(object this_, params object[] args)
		{
		if (args.Length == 0)
			return "";
		else
			return JConvert.ToString(args[0]);
		
		} // StringConstructorFunction
Example #2
0
		} // StringConstructorFunction
	
	
	// Implementation for calling the String constructor as a constructor.
	// "When String is called as part of a new expression, it is a constructor:
	// it initialises the newly created object."
	public static object StringConstructor(object this_, params object[] args)
		{
		string strValue;
		if (args.Length == 0)
			strValue = "";
		else
			strValue = JConvert.ToString(args[0]);
		
		return new JStringObject(strValue);
		} // StringConstructor
Example #3
0
		} // Get (string propName)
	
	
	public virtual object Get(object propName)
		{
		return Get(JConvert.ToString(propName));
		} // Get (object propName)