2012-05-28 3 views

Respuesta

2

No hay ninguno.

string.ToLower llamadas TextInfo.ToLower detrás de escena.

De String.cs:

// Creates a copy of this string in lower case. 
    public String ToLower() { 
     return this.ToLower(CultureInfo.CurrentCulture); 
    } 

    // Creates a copy of this string in lower case. The culture is set by culture. 
    public String ToLower(CultureInfo culture) { 
     if (culture==null) { 
      throw new ArgumentNullException("culture"); 
     } 
     return culture.TextInfo.ToLower(this); 
    } 
2

El ToLower y ToLowerInvariant métodos en las cadenas realidad ponen en la propiedad virtual TextInfo cuando se invoca. Por este motivo, siempre llevan la sobrecarga de este acceso a la propiedad virtual. Los métodos de tipo de cadena no tienen diferencia en los valores de resultado pero son más lentos en algunos casos.

The full article + Benchmark

En aras de la sencillez de uso str.ToLower() y olvidarse de la cuestión!