The "using" keyword, with the Split method C#

Im trying to figure out how to use the split method in c#.

string[] names=fullName.Split(" ");

to split the single string of fullName, and give me the individual parts of the fullName, which are separated by spaces, and give me a string of names to work with.

First off am i using the method right?

Im getting the error of “Split does not exist in the current context”, but i am just calling it inside of a MonoBehaviour descended script. This leads me to believe i need to use

using xxxxxx
using System.Co`enter code here`llections.Generic;//like this, for enabling List<type>

ps what is the using keyword, and what it does called?

You’re almost there. String.Split takes an array of characters for the separators. Like so:

string[] names = fullName.Split(new char[] {' '});

That should do it.

i did have to use “using System;”, i saw this in some example using the split somewhere.
This is the code im using, to basically tag a level and have my persistent UI react to a level by name.
What else does System contain, down the road i had gotten an error about converting char to string?

public void OnLevelLoad(string levelName){
		//if we spawned in a level where we use the hud
		string[] fullName=levelName.Split(' ');//splits via a space in the string
		if(name[0].ToString()=="Menu"){ 
			
		}else if(name[0].ToString()=="InGame"){
			refTime=Time.time+preGameCountdownTime;
			EnterGame(true);
		}
	}

ASP.Net C# Split string function provides the functionality to split the string into a string array by specifying its delimiters. C# split string function splits the string into array collection according to the number of separators passed to the split function. ASP.Net C# split string function removes the delimiters from the string and stores each part separated at consecutive indexes of array object. In ASP.Net 2.0 C# split string function has 6 overloads as follows.
for full implementation refer here:
String Split in C#