need blazor formatting help
i want this to display everything in a line but it's adding a break after each item
10 Replies
i want it to display like
Current members: 1, 2, 3
If
bandMembers
is a collection of strings in the format of memberx
, you'll have to remove the member
part of those strings
With .Replace()
for example
And, with .Select()
, you can do that to all elements of the collection
So that you can, then, string.Join()
the numbers
Instead of inserting commas with that if/elsecan i have an example of how all of this would work
Angius
REPL Result: Success
Result: List<string>
Compile: 387.423ms | Execution: 55.147ms | React with ❌ to remove this embed.
Angius
REPL Result: Success
Result: string
Compile: 281.281ms | Execution: 41.370ms | React with ❌ to remove this embed.
okay
i was able to just completely get rid of the foreach and just do this
Yep
ty for your help