Click here to Skip to main content
15,885,537 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.

 
GeneralBreaking news: Many members of microsoft upper management fallen into euphoric coma! Pin
Mark_Wallace8-Apr-20 22:21
Mark_Wallace8-Apr-20 22:21 
GeneralRe: Breaking news: Many members of microsoft upper management fallen into euphoric coma! Pin
Sander Rossel8-Apr-20 23:05
professionalSander Rossel8-Apr-20 23:05 
GeneralRe: Breaking news: Many members of microsoft upper management fallen into euphoric coma! Pin
Slacker0078-Apr-20 23:38
professionalSlacker0078-Apr-20 23:38 
GeneralRe: Breaking news: Many members of microsoft upper management fallen into euphoric coma! Pin
Sander Rossel9-Apr-20 0:02
professionalSander Rossel9-Apr-20 0:02 
GeneralRe: Breaking news: Many members of microsoft upper management fallen into euphoric coma! Pin
Mark_Wallace9-Apr-20 2:52
Mark_Wallace9-Apr-20 2:52 
GeneralRe: Breaking news: Many members of microsoft upper management fallen into euphoric coma! Pin
Johnny J.8-Apr-20 23:05
professionalJohnny J.8-Apr-20 23:05 
GeneralRe: Breaking news: Many members of microsoft upper management fallen into euphoric coma! Pin
Mark_Wallace9-Apr-20 2:55
Mark_Wallace9-Apr-20 2:55 
GeneralC# puzzle.... Pin
James Curran8-Apr-20 13:00
James Curran8-Apr-20 13:00 
(I was torn between putting these here or in the C# forum, but it not really a serious question...)

Given a simple string
C#
const string _str = "abcdefghijklmnopqrstuvwxyz";

put the following equivalent code blocks in order of their speed:
C#
if ( _str.Contains("~")) {....}             // A
if ( _str.Contains('~')) {....}             // B
if ( _str.IndexOf("~") >= 0)   {....}       // C
if ( _str.IndexOf('~') >= 0)   {....}       // D
if ( _str.IndexOf("~", StringComparison.Ordinal) >= 0)  {....}    //E

Hint: there are three tiers --- One is the clear winning. Two others are about the same, significantly behind, and the last two are about the same, way behind the others.
Truth,

James

GeneralRe: C# puzzle.... Pin
Nish Nishant8-Apr-20 13:30
sitebuilderNish Nishant8-Apr-20 13:30 
GeneralRe: C# puzzle.... Pin
James Curran8-Apr-20 14:02
James Curran8-Apr-20 14:02 
GeneralRe: C# puzzle.... Pin
Nish Nishant8-Apr-20 14:14
sitebuilderNish Nishant8-Apr-20 14:14 
GeneralRe: C# puzzle.... Pin
Garth J Lancaster8-Apr-20 15:19
professionalGarth J Lancaster8-Apr-20 15:19 
GeneralRe: C# puzzle.... Pin
Nish Nishant9-Apr-20 13:08
sitebuilderNish Nishant9-Apr-20 13:08 
GeneralRe: C# puzzle.... Pin
Nish Nishant8-Apr-20 13:35
sitebuilderNish Nishant8-Apr-20 13:35 
GeneralRe: C# puzzle.... Pin
Mario Vernari8-Apr-20 20:00
Mario Vernari8-Apr-20 20:00 
GeneralRe: C# puzzle.... Pin
Nelek8-Apr-20 23:09
protectorNelek8-Apr-20 23:09 
GeneralRe: C# puzzle.... Pin
Jörgen Andersson9-Apr-20 1:24
professionalJörgen Andersson9-Apr-20 1:24 
GeneralRe: C# puzzle.... Pin
Greg Utas8-Apr-20 13:56
professionalGreg Utas8-Apr-20 13:56 
GeneralRe: C# puzzle.... Pin
OriginalGriff8-Apr-20 20:07
mveOriginalGriff8-Apr-20 20:07 
GeneralRe: C# puzzle.... Pin
Greg Utas8-Apr-20 23:11
professionalGreg Utas8-Apr-20 23:11 
GeneralRe: C# puzzle.... Pin
Member 147747708-Apr-20 15:11
Member 147747708-Apr-20 15:11 
GeneralRe: C# puzzle.... Pin
Jörgen Andersson8-Apr-20 20:03
professionalJörgen Andersson8-Apr-20 20:03 
GeneralRe: C# puzzle.... Pin
OriginalGriff8-Apr-20 20:09
mveOriginalGriff8-Apr-20 20:09 
GeneralRe: C# puzzle.... Pin
Nish Nishant9-Apr-20 13:10
sitebuilderNish Nishant9-Apr-20 13:10 
GeneralRe: C# puzzle.... Pin
OriginalGriff8-Apr-20 19:54
mveOriginalGriff8-Apr-20 19:54 

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.