Max Korsakov
Split function is easy way.
FullName.Split(" "c) returns set substrings.
Yes, this is easy solution, but...
IF FullName contains many spaces, or double name?🤔
For Example:
"Mary Elizabeth Smith"
Result: {
"Mary",
" ",
"Elizabeth",
" ",
" ",
"Smith",
" "
}
or
Example: "Mary - Elizabeth Smith"
Result: {
"Mary",
"-",
"Elizabeth",
" ",
"Smith"
}
If only through the cycle -> not String.IsNullOrEmpty