Split string and get first value only
c#, split
Solution
string valueStr = "title, genre, director, actor";
var vals = valueStr.Split(',')[0];
vals will give you the title
Problem
I wonder if it's possible to use split to devide a string with several parts that are separated with a comma, like this: ``` title, genre, director, actor ``` I just want the first part, the title of each string and not the rest?