Besoin d'aide sur mon code.

Résolu
Adry_34160 Messages postés 9 Date d'inscription mercredi 4 juillet 2007 Statut Membre Dernière intervention 6 juillet 2007 - 5 juil. 2007 à 20:12
Lutinore Messages postés 3246 Date d'inscription lundi 25 avril 2005 Statut Membre Dernière intervention 27 octobre 2012 - 5 juil. 2007 à 21:10
Bonjour,
Je tente de faire mon premier programme.
Un simple affichage de Table de multiplication.
 
Mais une erreur me bloque: 'System.Array' ne contient pas de définition pour 'length'

Le code est le suivant:
Si quelqu'un pourrai me donner la solution?

////////////////////////////

// TABLE DE MULTIPLICATION// //1er programme, soyez indulgent :-)//

// BY AdRi3n.(1st prog.) //

////////////////////////////

using

System;
using

System.Collections;
using

System.Collections.Generic;
using

System.Text;
namespace

Jenestmarre{

 

class
Test{

public
class
SamplesArrey{

public
static
void Main(){

 

 

int[] array1 =
new
int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };

for (
int i = 0; i < array1.length; i++)

Console.Out.WriteLine(array1[i]);

int[] array2 =
new
int[] { 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };

for (
int i = 0; i < array2.length; i++)

Console.Out.WriteLine(array2[i]);

int[] array3 =
new
int[] { 2, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20 };

for (
int i = 0; i < array3.length; i++)

Console.Out.WriteLine(array3[i]);

int[] array4 =
new
int[] { 3, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30 };

for (
int i = 0; i < array4.length; i++)

Console.Out.WriteLine(array4[i]);

int[] array5 =
new
int[] { 4, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40 };

for (
int i = 0; i < array5.length; i++)

Console.Out.WriteLine(array5[i]);

int[] array6 =
new
int[] { 5, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50 };

for (
int i = 0; i < array6.length; i++)

Console.Out.WriteLine(array6[i]);

int[] array7 =
new
int[] { 6, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60 };

for (
int i = 0; i < array7.length; i++)

Console.Out.WriteLine(array7[i]);

int[] array8 =
new
int[] { 7, 7, 14, 21, 29, 36, 43, 50, 57, 63, 70 };

for (
int i = 0; i < array8.length; i++)

Console.Out.WriteLine(array8[i]);

int[] array9 =
new
int[] { 8, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80 };

for (
int i = 0; i < array9.length; i++)

Console.Out.WriteLine(array9[i]);

int[] array10 =
new
int[] { 9, 9, 18, 27, 36, 45, 54, 63, 72, 81, 90 };

for (
int i = 0; i < array10.length; i++)

Console.Out.WriteLine(array10[i]);

int[] array11 =
new
int[] { 10, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 };

for (
int i = 0; i < array11.length; i++)

Console.Out.WriteLine(array11[i]);}

}

}

}

3 réponses

Lutinore Messages postés 3246 Date d'inscription lundi 25 avril 2005 Statut Membre Dernière intervention 27 octobre 2012 41
5 juil. 2007 à 20:50
Salut, length sans majuscule n'existe pas, c'est Length.
3
Adry_34160 Messages postés 9 Date d'inscription mercredi 4 juillet 2007 Statut Membre Dernière intervention 6 juillet 2007
5 juil. 2007 à 21:04
Merci... je me sent stupide...
0
Lutinore Messages postés 3246 Date d'inscription lundi 25 avril 2005 Statut Membre Dernière intervention 27 octobre 2012 41
5 juil. 2007 à 21:10
Mais non.. maintenant tu sais que le C# respecte la casse ce qui n'est pas le cas de tous les langages..
0
Rejoignez-nous