I need to obtain in a new string the last element of a path. For ex, for the path
"C:\Users\MEDIACENTER\Desktop\Resurse_C#\Resurse\Imagini\Cluj1.txt"
I want to obtain "Cluj1.txt". Because I need a general method because I am working with a DataBase. The character '\' is the one that I have trouble with, because the C# syntax will not let me use it on the 3rd line of code:
01. while (dr.Read()) // in dr[0] contains the jpg path
02. {
02. string v = dr[0].ToString();
03. char c = '\';
04. string[] s = v.Split(c);
05. }