c# - How to sort a list<string> / array of string version number? -


i have list of strings of version (see photo), , i'd sort them in descending order.

enter image description here

i've seen few solutions using version class compare them, can't think of solution sort whole list this. least complicated way achieve this?

what wrong simple implementation?

using system; using system.collections.generic;  namespace consoleapplication1 {     class program     {         static void main(string[] args)         {             var ver = new list<version>();              ver.add(new version("3.5"));             ver.add(new version("3.15"));             ver.add(new version("3.10"));             ver.add(new version("3.1"));              ver.sort();             ver.reverse();         }     } } 

Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo