Skip to main content
1 of 5
Doc Brown
  • 220.3k
  • 35
  • 410
  • 623

There is no guarantee that a client implementing IGrid<T> does actually use an 2D array T[,] for the implementation. So IMHO you have the following options:

  • change (or extend) the interface of your Transformation class to use IGrid<T> instead of T[,]

  • extend IGrid<T> to provide access to underlying T[,], with the drawback of loosing immutability (which forces any client to use a T[,] internally)

Doc Brown
  • 220.3k
  • 35
  • 410
  • 623