//(...... etc) //demande info par nameId sur les inscriptions ConstructIdent[] myInscriptions = InscriptionsWP.GetInscriptions(nameId); // declaration Generic List<type> List<ConstructIdent> monListSansAnnulation = new List<ConstructIdent>(); int etatId; int localisation; bool repere; foreach (ConstructIdent inscription in monInscription) { etatId = inscription.BwetatId; if (!etatId.Equals(3)) { localisation = 0; repere = false; foreach (ConstructIdent InsertInscription in monListSansAnnulation) { if (inscription.BwetatId < InsertInscription.BwetatId) { monListSansAnnulation.Insert(localisation, inscription); repere = true; break; } localisation++; } if (!repere) { monListSansAnnulation.Add(inscription); } } } int i = 1; //(...... etc)
//demande info par nameId sur les inscriptions ConstructIdent[] myInscriptions = InscriptionsWP.GetInscriptions(nameId); // declaration Generic List<type> List<ConstructIdent> monListSansAnnulation = new List<ConstructIdent>();
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionmaListeOrdonnee maListe.OrderBy(element> element.BwEtatId).ToList();
using System.Linq; using System.Text;
//demande info par nameId sur les inscriptions ConstructIdent[] myInscriptions = InscriptionsWP.GetInscriptions(nameId); //demande info par nameId sur les inscriptions ConstructIdent[] myInscriptions = InscriptionsWP.GetInscriptions(nameId); // declaration Generic List<type> List<ConstructIdent> monListSansAnnulation = new List<ConstructIdent>(); //ton code Linq : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! monListSansAnnulation monListSansAnnulation.OrderBy(element> element.BwEtatId).ToList(); //ensuite la reste :
//demande info par nameId sur les inscriptions ConstructIdent[] myInscriptions = InscriptionsWP.GetInscriptions(nameId); //demande info par nameId sur les inscriptions ConstructIdent[] myInscriptions = InscriptionsWP.GetInscriptions(nameId); // declaration Generic List<type> List<ConstructIdent> monListSansAnnulation = new List<ConstructIdent>(); //ton code Linq : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! monListSansAnnulation monListSansAnnulation.OrderBy(element> element.BwEtatId).ToList(); //ensuite la reste :