How to remove a defined part of a string?

you can use this code:

str = str.Substring (10); // to remove the first 10 characters.
str = str.Remove (0, 10); // to remove the first 10 characters
str = str.Replace ("NT-DOM-NV\\", ""); // to replace the specific text with blank

//  to delete anything before \

int i = str.IndexOf('\\');
if (i >= 0) str = str.SubString(i+1);

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)