From 3cbf9d781623d76dcd2beca6a8fa4dc4e3585f5a Mon Sep 17 00:00:00 2001 From: lindexi Date: Thu, 3 Jan 2019 23:54:21 +0800 Subject: [PATCH] Using key word (#10172) In [coding-style.md](https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/coding-style.md ) NO 11, we use language keywords instead of BCL types --- .../sample/RazorPagesMovie22/Pages/Movies/Index.cshtml.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aspnetcore/tutorials/razor-pages/razor-pages-start/sample/RazorPagesMovie22/Pages/Movies/Index.cshtml.cs b/aspnetcore/tutorials/razor-pages/razor-pages-start/sample/RazorPagesMovie22/Pages/Movies/Index.cshtml.cs index 21783d918f..eb64e03e38 100644 --- a/aspnetcore/tutorials/razor-pages/razor-pages-start/sample/RazorPagesMovie22/Pages/Movies/Index.cshtml.cs +++ b/aspnetcore/tutorials/razor-pages/razor-pages-start/sample/RazorPagesMovie22/Pages/Movies/Index.cshtml.cs @@ -37,7 +37,7 @@ namespace RazorPagesMovie.Pages.Movies var movies = from m in _context.Movie select m; #region snippet_SearchNull - if (!String.IsNullOrEmpty(SearchString)) + if (!string.IsNullOrEmpty(SearchString)) { movies = movies.Where(s => s.Title.Contains(SearchString)); } @@ -68,12 +68,12 @@ namespace RazorPagesMovie.Pages.Movies var movies = from m in _context.Movie select m; - if (!String.IsNullOrEmpty(SearchString)) + if (!string.IsNullOrEmpty(SearchString)) { movies = movies.Where(s => s.Title.Contains(SearchString)); } - if (!String.IsNullOrEmpty(MovieGenre)) + if (!string.IsNullOrEmpty(MovieGenre)) { movies = movies.Where(x => x.Genre == MovieGenre); }