How do I get the first word of a string.
string test = "hello, world"
I used test.Split(' ').FirstOrDefault() but it returns "hello,"
I could try by adding the separator as comma but even if there is comma or space, I need just the word 'hello'. I mean if string test = "hello world" then also it should return "hello"