how to split a string that contains comma and store into 3 variables.
i have a string like this
string s= "abcdf5==,ftyuyt6g8*,yut5431";
now i want to split that by comma and store into 3 string variables.
new to C# (rookie)
how to split a string that contains comma and store into 3 variables.
i have a string like this
string s= "abcdf5==,ftyuyt6g8*,yut5431";
now i want to split that by comma and store into 3 string variables.
new to C# (rookie)
string s= "abcdf5==,ftyuyt6g8*,yut5431";
When you get it to compile, you could always use string.Split
var result = s.Split(',');
var variable1 = result[0];
var variable2 = result[1];
var variable3 = result[2];
Returns a string array that contains the substrings in this instance that are delimited by elements of a specified string or Unicode character array.