From 3930ab639bdc232440625e2febae0654851c8239 Mon Sep 17 00:00:00 2001 From: Hisham Abdullah Bin Ateya Date: Sat, 20 Jun 2015 21:12:19 +0300 Subject: [PATCH] Using 'nameof' operator instead of magic strings --- src/Microsoft.AspNet.StaticFiles/SendFileMiddleware.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.AspNet.StaticFiles/SendFileMiddleware.cs b/src/Microsoft.AspNet.StaticFiles/SendFileMiddleware.cs index 4ae87fa3b9..743d35b634 100644 --- a/src/Microsoft.AspNet.StaticFiles/SendFileMiddleware.cs +++ b/src/Microsoft.AspNet.StaticFiles/SendFileMiddleware.cs @@ -74,13 +74,13 @@ namespace Microsoft.AspNet.StaticFiles var fileInfo = new FileInfo(fileName); if (offset < 0 || offset > fileInfo.Length) { - throw new ArgumentOutOfRangeException("offset", offset, string.Empty); + throw new ArgumentOutOfRangeException(nameof(offset), offset, string.Empty); } if (length.HasValue && (length.Value < 0 || length.Value > fileInfo.Length - offset)) { - throw new ArgumentOutOfRangeException("length", length, string.Empty); + throw new ArgumentOutOfRangeException(nameof(length), length, string.Empty); } #if DNX451