IArray.cs 573 B

123456789101112131415161718192021
  1. namespace Ryujinx.Common.Memory
  2. {
  3. /// <summary>
  4. /// Array interface.
  5. /// </summary>
  6. /// <typeparam name="T">Element type</typeparam>
  7. public interface IArray<T> where T : unmanaged
  8. {
  9. /// <summary>
  10. /// Used to index the array.
  11. /// </summary>
  12. /// <param name="index">Element index</param>
  13. /// <returns>Element at the specified index</returns>
  14. ref T this[int index] { get; }
  15. /// <summary>
  16. /// Number of elements on the array.
  17. /// </summary>
  18. int Length { get; }
  19. }
  20. }