Salut,
existe t il une option pour que les tableau soient definis en partant de 1 et non de 0 ?
Merci
Slumpy
Salut,
existe t il une option pour que les tableau soient definis en partant de 1 et non de 0 ?
Merci
Slumpy
Merci de m aider c cool, mais je dois avoir un pb, ca marche pas : a(1 to 5). j ai un message d erreur m indiquant que la borne inferieure ne peut etre que 0
Arf, j ai bien peur que ce ne soit plus possible en vb.net :
source : http://www.samspublishing.com/articl...p?p=21414&rl=1VB6 allowed you to have a nonzero lower boundary in your arrays in a couple of ways. First, you could declare an array to have a certain range. If you wanted an array to start with 1, you declared it like this:
Dim y(1 To 3) As IntegerThis would create an array with three elements, indexed 1–3. If you didn't like this method, you could use Option Base, which allowed you to set the default lower boundary to either 0 (the default) or 1.
VB.NET removes those two options from you. You cannot use the "1 to x" syntax, and Option Base is no longer supported. In fact, because the lower boundary of the array is always 0, the Lbound function is no longer supported.
Car je trouve qu il est facile de se perdre dans les indices quand ca demarre a 0. J ai toujours prefere que mon premier element soit 1.
Et pourquoi pas laisser le 0 vide ? C est la meme idee, tu peux te planter avec la methode Length, qui compte +1 pour la case en 0.
Partager