La Red de Conocimientos Pedagógicos - Currículum vitae - C# elimina el texto especificado previamente

C# elimina el texto especificado previamente

cadena pública cutString(string sourceText, string splitUnit)

{

int x = sourceText.LastIndexOf(splitUnit);

if (-1 == x)

devuelve texto fuente;

else

devuelve texto fuente.Substring(x 1, textofuente.Longitud - x-1);

}