ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,187 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
Is it a better way or consider a best practice to call ToTileCase in Asp.Net MVC Core 6 ?
System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase((payment.DTitle ?? "").ToLower())
if you need the feature, then call it. In you sample code, there is no reason to call it because you convert to lowercase anyway and be better written:
payment.DTitle?.ToLower() ?? ""