2010-03-30 10 views

risposta

35

Usa String.Substring e String.LastIndexOf metodi.

string str = "MyNamespace.SubNameSpace.MyClassName"; 
string str1 = str.Substring(str.LastIndexOf('.') + 1); 
+7

+1 per aggiungere il +1 per ottenere tutto * dopo * l'ultimo periodo. –

+1

Grazie a @Jon per la modifica. – rahul

Problemi correlati