This method will split the string "path" at "//" and will return last
of the array. Normally, if you copy any folder path then last is the
folder name. that you can achive with this/

On Feb 22, 9:01 pm, Learner <[email protected]> wrote:
> Hi,
>
>   Can some one explain the below function
>
> public static string ExtractUserName(string path)
>     {
>         string[] userPath = path.Split(new char[] { '\\' });
>         return userPath[userPath.Length - 1];
>     }
>
> Thanks,
>
> L

Reply via email to