c# - Custom OrderBy for IList -


मेरे पास IList & lt; स्ट्रिंग & gt; और चाहते हैं निम्न परिदृश्य के आधार पर इस सूची के अनुसार आदेश: तत्व जो "abs" के साथ शुरू होते हैं शीर्ष पर रहने के लिए और अन्य को सामान्य तरीके से सॉर्ट किया जाएगा जैसा कि String.CompareTo

टीटीआई का यह सरल कोड:

stringArray.OrderBy (x = & gt; x.StartsWith ("abs")? 0: 1)। तब (x = & gt; x);

Comments

Popular posts from this blog

c++ - why does this code produce a runtime error? -

java - Can Find the error -

maximum size of array in c -