✅ how to avoid string.Join with empty strings?
I have
List<IdentifierDto> Identifiers
and I'm trying to get Title
from Identifiers
my code:
some times I get result: "," and I don't understand how can I fix this7 Replies
JoinToString is just string.Join
Ero#1111
REPL Result: Success
Result: string
Compile: 534.603ms | Execution: 36.130ms | React with ❌ to remove this embed.
Ero#1111
REPL Result: Success
Result: string
Compile: 542.459ms | Execution: 44.791ms | React with ❌ to remove this embed.
Has to be 2 empty or null strings then
Perhaps because
identifier
is nulltitle
is "" as I see using debuggerJust put a
.Where(t => !string.IsNullOrEmpty(t))
in between thereah.. I hadn't thought of that at all..
thanks