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