Ejemplo n.º 1
0
        public void InvalidTypeTest()
        {
            var arr = UnsafeList.Allocate <int>(10);

            Assert.Catch <AssertException>(() => { UnsafeList.Set <float>(arr, 4, 20); });

            UnsafeList.Free(arr);
        }
Ejemplo n.º 2
0
 public T this[int index]
 {
     [MethodImpl(MethodImplOptions.AggressiveInlining)]
     get
     {
         return(UnsafeList.Get <T>(m_inner, index));
     }
     [MethodImpl(MethodImplOptions.AggressiveInlining)]
     set
     {
         UnsafeList.Set(m_inner, index, value);
     }
 }