From db5dcbda2360ffd6f99478670639f44089733830 Mon Sep 17 00:00:00 2001 From: Edward Miller Date: Wed, 27 Mar 2024 19:25:10 -0500 Subject: [PATCH] micro-optimization --- Maui.DataGrid/DataGridRow.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Maui.DataGrid/DataGridRow.cs b/Maui.DataGrid/DataGridRow.cs index c418143..144277e 100644 --- a/Maui.DataGrid/DataGridRow.cs +++ b/Maui.DataGrid/DataGridRow.cs @@ -183,7 +183,9 @@ private View CreateEditCell(DataGridColumn col) private View CreateDefaultEditCell(DataGridColumn col) { - return Type.GetTypeCode(col.DataType) switch + var typeCode = Type.GetTypeCode(col.DataType); + + return typeCode switch { TypeCode.String => GenerateTextEditCell(col), TypeCode.Boolean => GenerateBooleanEditCell(col),