C# using a variable as a pointer to a location in 2D array -


first of i’m not seasoned programmer , i’m learning c# on fly project @ work.

without going overall details of project, analytic calculator generating thermal vs time data semiconductor junction. “user” inputs loaded text file contain names of parameters along values. example “rth_1 ,0.023”

since don’t have control of actual placement of each parameter in text file necessary sort load data 2d array read text file , keep track of each parameter in 2d array.

so i’m wanting use variable or pointer location. “param1 = [12],[2]”

is possible in c#?

technically, can use several approaches having "single" pointer cell in 2d array. straightforward use point class. well, point position in discrete space after all.

another approach use bit shifting if know array not more 2^32 or 2^16. use i<<16+j store pointer.

or can use keyvaluepair<int, int>. or tuple<int, int>.


Comments