namespace IrrlichtNetSwig
{
    public partial class arrayUShort
    {
        public ushort this[uint index]
        {
            get
            {
                if (index < 0 || size() < index)
                {
                    throw new System.IndexOutOfRangeException();
                }
                return getValue(index);
            }
            set
            {
                if (index < 0 || size() < index)
                {
                    throw new System.IndexOutOfRangeException();
                }
                setValue(index, value);
            }
        }
        public static implicit operator arrayUShort(ushort[] other)
        {
            var arr = new arrayUShort((uint)other.Length);
            for (uint i = 0; i < other.Length; i++)
            {
                arr.push_back(other[i]);
            }
            return arr;
        }
        public ushort[] ToArray()
        {
            var arr = new ushort[size()];
            for (uint i = 0; i < size(); i++)
            {
                arr[i] = this[i];
            }
            return arr;
        }
    }
}