© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
9 replies
SWEETPONY

✅ how to avoid string.Join with empty strings?

I have
List<IdentifierDto> Identifiers
List<IdentifierDto> Identifiers
and I'm trying to get
Title
Title
from
Identifiers
Identifiers


my code:
 Identifier: subject.Identifiers?
           .Select( identifier => identifier?.Title )
           .JoinToString( "," )
 Identifier: subject.Identifiers?
           .Select( identifier => identifier?.Title )
           .JoinToString( "," )


some times I get result: "," and I don't understand how can I fix this
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

how to avoid "-0" when converting float to string?
C#CC# / help
16mo ago
❔ empty string not being recognized
C#CC# / help
4y ago
❔ Help with strings
C#CC# / help
4y ago