Click here to Skip to main content
15,891,423 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Humans are ridiculous Pin
honey the codewitch17-Dec-19 18:52
mvahoney the codewitch17-Dec-19 18:52 
GeneralRe: Humans are ridiculous Pin
Super Lloyd17-Dec-19 18:58
Super Lloyd17-Dec-19 18:58 
GeneralRe: Humans are ridiculous Pin
honey the codewitch17-Dec-19 18:59
mvahoney the codewitch17-Dec-19 18:59 
GeneralRe: Humans are ridiculous Pin
Super Lloyd17-Dec-19 19:03
Super Lloyd17-Dec-19 19:03 
GeneralRe: Humans are ridiculous Pin
honey the codewitch17-Dec-19 19:07
mvahoney the codewitch17-Dec-19 19:07 
GeneralRe: Humans are ridiculous Pin
Super Lloyd17-Dec-19 19:20
Super Lloyd17-Dec-19 19:20 
GeneralRe: Humans are ridiculous Pin
Nelek18-Dec-19 0:29
protectorNelek18-Dec-19 0:29 
GeneralRe: Humans are ridiculous Pin
Super Lloyd17-Dec-19 19:01
Super Lloyd17-Dec-19 19:01 
2nd option, perhaps to your liking, but really slower, using more memory, less readable
but it does avoid the local count variable
C#
var list = new HashSet<object>() { };
var result = new StringBuilder();

foreach (var item in list)
{
    if (result.Length > 0)
        result.Remove(result.Length - 3, 3);
    result.Append(item);
    result.Append(",or ");
}

return result.ToString();
A new .NET Serializer
All in one Menu-Ribbon Bar
Taking over the world since 1371!

GeneralRe: Humans are ridiculous Pin
honey the codewitch17-Dec-19 19:02
mvahoney the codewitch17-Dec-19 19:02 
GeneralENGLISH is ridiculous Pin
Daniel Pfeffer17-Dec-19 19:29
professionalDaniel Pfeffer17-Dec-19 19:29 
GeneralRe: ENGLISH is ridiculous Pin
honey the codewitch17-Dec-19 19:31
mvahoney the codewitch17-Dec-19 19:31 
GeneralRe: ENGLISH is ridiculous Pin
Super Lloyd17-Dec-19 20:45
Super Lloyd17-Dec-19 20:45 
GeneralRe: ENGLISH is ridiculous Pin
PIEBALDconsult18-Dec-19 6:23
mvePIEBALDconsult18-Dec-19 6:23 
GeneralRe: ENGLISH is ridiculous Pin
TheGreatAndPowerfulOz18-Dec-19 6:33
TheGreatAndPowerfulOz18-Dec-19 6:33 
GeneralRe: ENGLISH is ridiculous Pin
honey the codewitch17-Dec-19 19:33
mvahoney the codewitch17-Dec-19 19:33 
GeneralRe: Humans are ridiculous Pin
Richard Deeming18-Dec-19 0:06
mveRichard Deeming18-Dec-19 0:06 
GeneralRe: Humans are ridiculous Pin
StarNamer@work18-Dec-19 2:44
professionalStarNamer@work18-Dec-19 2:44 
GeneralRe: Humans are ridiculous Pin
honey the codewitch18-Dec-19 2:45
mvahoney the codewitch18-Dec-19 2:45 
GeneralRe: Humans are ridiculous Pin
StarNamer@work18-Dec-19 3:47
professionalStarNamer@work18-Dec-19 3:47 
GeneralRe: Humans are ridiculous Pin
honey the codewitch18-Dec-19 3:49
mvahoney the codewitch18-Dec-19 3:49 
GeneralMini CCCs 156 Pin
Tim Deveaux17-Dec-19 16:37
Tim Deveaux17-Dec-19 16:37 
GeneralRe: Mini CCCs 156 Pin
OriginalGriff17-Dec-19 20:51
mveOriginalGriff17-Dec-19 20:51 
GeneralRe: Mini CCCs 156 Pin
Tim Deveaux18-Dec-19 1:17
Tim Deveaux18-Dec-19 1:17 
Generalimages of a wondrous world Pin
BillWoodruff17-Dec-19 8:21
professionalBillWoodruff17-Dec-19 8:21 
GeneralRe: images of a wondrous world Pin
Rick York17-Dec-19 9:27
mveRick York17-Dec-19 9:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.