dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
18.84k stars 4k forks source link

[suggestion] Metadata as source should use "natural" sort order #4548

Open rchande opened 9 years ago

rchande commented 9 years ago

For unspecified reasons, I had a class containing many methods with names like method1 ,method2, method30, method4001, etc. When I visualized it in MAS, the generated file looked like

public void Method0();
public void Method1();
public void Method10();
public void Method100();
public void Method1000();

instead of

public void Method0();
public void Method1();
public void Method2();

and so forth.

It would be nice if MAS used natural sort instead of alphabetical sort, as described on http://blog.codinghorror.com/sorting-for-humans-natural-sort-order/.

tmat commented 9 years ago

... and it should use metadata order if the containing type is a COM interface as I pointed out here: https://github.com/dotnet/roslyn/issues/4400