/// <summary>
        /// Sets the value associated to the specified key.
        /// </summary>
        /// <param name="key">The key.</param>
        /// <param name="value">The value.</param>
        public void Set(string key, DynValue value)
        {
            if (key == null)
            {
                throw ScriptRuntimeException.TableIndexIsNil();
            }

            this.CheckScriptOwnership(value);
            PerformTableSet(m_StringMap, key, DynValue.NewString(key), value, false, -1);
        }
        /// <summary>
        /// Sets the value associated with the specified keys.
        /// Multiple keys can be used to access subtables.
        /// </summary>
        /// <param name="key">The keys.</param>
        /// <param name="value">The value.</param>
        public void Set(object[] keys, DynValue value)
        {
            if (keys == null || keys.Length <= 0)
            {
                throw ScriptRuntimeException.TableIndexIsNil();
            }

            object key;

            ResolveMultipleKeys(keys, out key).Set(key, value);
        }
        /// <summary>
        /// Sets the value associated with the specified key.
        /// </summary>
        /// <param name="key">The key.</param>
        /// <param name="value">The value.</param>
        public void Set(object key, DynValue value)
        {
            if (key == null)
            {
                throw ScriptRuntimeException.TableIndexIsNil();
            }

            if (key is string)
            {
                Set((string)key, value);
            }
            else if (key is int)
            {
                Set((int)key, value);
            }
            else
            {
                Set(DynValue.FromObject(OwnerScript, key), value);
            }
        }
        /// <summary>
        /// Sets the value associated to the specified key.
        /// </summary>
        /// <param name="key">The key.</param>
        /// <param name="value">The value.</param>
        public void Set(DynValue key, DynValue value)
        {
            if (key.IsNilOrNan())
            {
                if (key.IsNil())
                {
                    throw ScriptRuntimeException.TableIndexIsNil();
                }
                else
                {
                    throw ScriptRuntimeException.TableIndexIsNaN();
                }
            }

            if (key.Type == DataType.String)
            {
                Set(key.String, value);
                return;
            }

            if (key.Type == DataType.Number)
            {
                int idx = GetIntegralKey(key.Number);

                if (idx > 0)
                {
                    Set(idx, value);
                    return;
                }
            }

            this.CheckScriptOwnership(key);
            this.CheckScriptOwnership(value);

            PerformTableSet(m_ValueMap, key, key, value, false, -1);
        }