From 0bfebf7faca88a7009cda190676d212a95305e8f Mon Sep 17 00:00:00 2001 From: Henk Mollema Date: Thu, 23 Apr 2015 00:15:18 +0200 Subject: [PATCH] Use `string.IsNullOrEmpty()` instead of empty string check. --- src/Microsoft.AspNet.Mvc.Core/FormatterMappings.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.AspNet.Mvc.Core/FormatterMappings.cs b/src/Microsoft.AspNet.Mvc.Core/FormatterMappings.cs index ab184bd690..276f7ac81c 100644 --- a/src/Microsoft.AspNet.Mvc.Core/FormatterMappings.cs +++ b/src/Microsoft.AspNet.Mvc.Core/FormatterMappings.cs @@ -66,7 +66,7 @@ namespace Microsoft.AspNet.Mvc private string RemovePeriodIfPresent(string format) { - if (format == "") + if (string.IsNullOrEmpty(format)) { throw new ArgumentException(Resources.ArgumentCannotBeNullOrEmpty, nameof(format)); }