I guess you are trying to understand "new char[]" statement. Here you are
declaring and initializing a character array.

new char[] {'\\'} = declare a new character array and fill it with 1
character which is a 'backslash'



On Tue, Feb 23, 2010 at 9:23 AM, Arsalan Tamiz <[email protected]> wrote:

> Returns last node of a given path.
>
>
> On Mon, Feb 22, 2010 at 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