Hello gurus,
I'd like to know how is it possible to declare a predefined array of structure in C#?
The C declaration is like this:
typedef struct st_move_def {<br />
int byte;<br />
int bit;<br />
} MOVE_DEF ;<br />
<br />
static MOVE_DEF move_tab [8][8] = {<br />
{ {5, 8}, {3, 4}, {7, 6}, {4, 7}, {6, 3}, {2, 8}, {1, 5}, {8, 3} }, <br />
{ {8, 4}, {4, 5}, {2, 4}, {7, 8}, {1, 3}, {6, 5}, {5, 1}, {3, 2} }, <br />
{ {4, 1}, {2, 2}, {3, 3}, {1, 7}, {5, 2}, {7, 7}, {8, 6}, {6, 6} }, <br />
{ {7, 5}, {5, 6}, {1, 4}, {8, 2}, {2, 7}, {6, 1}, {4, 8}, {3, 1} }, <br />
{ {8, 8}, {1, 6}, {2, 1}, {6, 7}, {4, 2}, {7, 1}, {3, 5}, {5, 4} }, <br />
{ {3, 7}, {5, 7}, {6, 2}, {1, 2}, {7, 3}, {2, 6}, {4, 6}, {8, 1} }, <br />
{ {6, 4}, {8, 5}, {7, 2}, {5, 3}, {1, 1}, {3, 8}, {2, 5}, {4, 4} }, <br />
{ {3, 6}, {4, 3}, {6, 8}, {2, 3}, {8, 7}, {1, 8}, {5, 5}, {7, 4} } <br />
};
and I need to translate it into C#.
How can I do this please?
Best regards.
Fred.
There is no spoon.
|