Home > Net >  O teach lamada how to write?
O teach lamada how to write?

Time:11-06

Want to press DutyType group, won the most Number of each Type (Number) please advise how to write a data?

 

If (a list. The Count (x=& gt; X.D utyType=="1") & gt; 0)
{
ReList. Add (list. The Where (x=& gt; X.D utyType=="1"). OrderByDescending (x=& gt; X.N umber). FirstOrDefault ());
}
If (a list. The Count (x=& gt; X.D utyType=="2") & gt; 0)
{
ReList. Add (list. The Where (x=& gt; X.D utyType=="2"). OrderByDescending (x=& gt; X.N umber). FirstOrDefault ());
}
If (a list. The Count (x=& gt; X.D utyType=="3") & gt; 0)
{
ReList. Add (list. The Where (x=& gt; X.D utyType=="3"). OrderByDescending (x=& gt; X.N umber). FirstOrDefault ());
}


Like this right now

CodePudding user response:

Is write like this
  •  Tags:  
  • C#
  • Related