The ability to split a string is a common feature in programming. The way to implement this in c# is a bit different than most languages.
We have a string such as:
string myVars = “var1, var2, var3, var4”;
We need to split this string into an array of individual variables. That’s where our String.Split() method comes into play. Its pretty easy once you know the syntax. The Microsoft docs don’t mention this way:
string[] myArray = myVars.Split(‘,’);
The key is the single quotes around your delimiter in the split method.