Bonjour,
J'essaye d'initialiser 2 tableaux dans une methode.
Un en lui attribuant des valeurs et l'autre en ce servant des valeurs du premiers.
Je bloque..
Merci
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32 struct Myarray { public int[] Index; public int[,,,,] PrivateArray; public void Init() { Index = new int[5]; PrivateArray = new int[Index[0], Index[1], Index[2], Index[3], Index[4]]; } } static void Main(string[] args) { Myarray Sample = new Myarray(); Sample.Index[0] = 2; Sample.Index[1] = 5; Sample.Index[2] = 3; Sample.Index[3] = 4; Sample.Index[4] = 2; Sample.Init(); }