Am I doing String.split wrong? c# please

When I use this:

if(msg.userName == lines[0])
            {
                string str = msg.chatMessagePlainText.ToLower();
                string[] AttCommand = str.Split(' ') ;
                Debug.Log(AttackCommand[0]);
                Debug.Log(AttackCommand[1]);
                Debug.Log("Attack Command Called");
            }

The first Debug says: #
The second: a

I want the first to say #attack
The second: (playername)

msg.chatMessagePlainText.ToLower() = #attack (playername)

I’m following: How to split string into two integers? - Questions & Answers - Unity Discussions trying to make two substrings instead.

Uhm, AttCommand is not the same as AttackCommand. I guess AttackCommand is a string and doing AttackCommand[0] will get you the first character in that string. You most likely wanted to do this:

             string[] AttCommand = str.Split(' ') ;
             Debug.Log(AttCommand[0]);
             Debug.Log(AttCommand[1]);