Developers frequently want to ensure two strings are identical without having to worry if some characters are in uppercase in one string and the same characters are in lowercase in the other string. Frequently, you see developers using either ToUpper or ToLower to avoid the problem:
If Name.ToUpper = OtherName.ToUpper Then...
But both ToUpper and ToLower create new strings, which is extra (and unnecessary) work.
If you can live with some extra typing, you can avoid generating those new strings by using the Equals method that every variable has, passing the InvariantCultureIgnoreCase choice from the StringComparison enumeration:
if (Name.Equals(OtherName, StringComparison.InvariantCultureIgnoreCase))
Now you have much less to worry about.
Posted by Peter Vogel on 08/12/2015 at 2:20 PM
Microsoft, apparently trying to enhance every product it has with an AI-powered Copilot, announced a new one for the latest release of SQL Server Developer Tools (SSDT) in Visual Studio.
A cross-platform media player highlights the new Uno Platform 4.9, the latest edition of the application framework that lets developers write an application once in XAML and C# and deploy it to any target platform.
"As opposed to traditional deep learning (DL) model training, On-Device Training requires efficient use of compute and memory resources."
With Visual Studio v17.6 becoming generally available recently, Microsoft provided a peek at what's coming up in the next iteration, VS 2022 v17.7
Dev team shows how Welcome revamp was first presented and then how it was shaped by community feedback.
> More Webcasts