From 9109d232f33679a356cbfb44e52886a23e5f1bea Mon Sep 17 00:00:00 2001 From: Jeff Date: Mon, 27 Feb 2017 23:57:13 -0500 Subject: [PATCH] No longer sort properties and fields by name Fixes issue #1 --- src/ToMarkdownTable/LinqMarkdownTableExtensions.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ToMarkdownTable/LinqMarkdownTableExtensions.cs b/src/ToMarkdownTable/LinqMarkdownTableExtensions.cs index 62eb795..81a82f9 100644 --- a/src/ToMarkdownTable/LinqMarkdownTableExtensions.cs +++ b/src/ToMarkdownTable/LinqMarkdownTableExtensions.cs @@ -15,8 +15,7 @@ public static string ToMarkdownTable(this IEnumerable source) var gettables = Enumerable.Union( properties.Select(p => new { p.Name, GetValue = (Func)p.GetValue, Type = p.PropertyType }), - fields.Select(p => new { p.Name, GetValue = (Func)p.GetValue, Type = p.FieldType })) - .OrderBy(g => g.Name); + fields.Select(p => new { p.Name, GetValue = (Func)p.GetValue, Type = p.FieldType })); var maxColumnValues = source .Select(x => gettables.Select(p => p.GetValue(x)?.ToString()?.Length ?? 0))