Around and About .NET World

Il blog di Marco Minerva
posts - 1671, comments - 2232, trackbacks - 2135

My Links

News

Contattami su Live Messenger:


MCTS: Windows, Web, Distributed Applications & SQL Server

MCPD: Enterprise Applications

Tag Cloud

Archives

Post Categories

Links

Recommendations for Using Strings in Microsoft .NET 2.0

Code owners previously using the InvariantCulture for string comparison, casing, and sorting should strongly consider using a new set of String overloads in Microsoft .NET 2.0. Specifically, data that is designed to be culture-agnostic and linguistically irrelevant should begin specifying overloads using either the StringComparison.Ordinal or StringComparison.OrdinalIgnoreCase members of the new StringComparison enumeration. These enforce a byte-by-byte comparison similar to strcmp that not only avoids bugs from linguistic interpretation of essentially symbolic strings, but provides better performance.

Questo articolo è un po' vecchiotto, ma lo cito qui perché qualche giorno fa mi ha aiutato a risolvere un problema con cui stavo litigando da un po'. Magari può servire anche a qualcun'altro...

Print | posted on lunedì 25 dicembre 2006 22:14 | Filed Under [ C# VB .NET .NET Compact Framework ADO .NET & SQL ASP .NET ]

Comments have been closed on this topic.

Powered by:
Powered By Subtext Powered By ASP.NET