In C#, I want to have a data structure that maps (x,y) coordinates to (x,y). How can I do something like this?
I don't want to convert the x,y coordinate into a single value using a formula like y*w+x
. Is there a way to have dictionary<key,key,(value,value)>
.
If I put the key as Tuple, then its an object and Tuple(1,1) does not equal Tuple(1,1). So I don't think I can find keys in that sense.