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

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -