4 ms·
Since most other popular languages seem represented: string SortedKeyList<T, U>(params IDictionary<T, U>[] maps) { var keys = new S
by halter73 14y ago
Since most other popular languages seem represented:
string SortedKeyList<T, U>(params IDictionary<T, U>[] maps)
{
var keys = new SortedSet<string>(maps.SelectMany(m => m.Keys)
.Select(k => k.ToString()));
return keys.Any() ? String.Join(", ", keys) : "<none>";
}
EDIT: I just realized that a lot of curly brace languages look the same to the uninitiated. The above is C#.