Click here to Skip to main content
14,423,178 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: Weird Performance Pin
Nelek20-Dec-19 9:44
protectorNelek20-Dec-19 9:44 
GeneralHow many values between 0 and 0? Pin
raddevus16-Dec-19 6:59
communityengineerraddevus16-Dec-19 6:59 
GeneralRe: How many values between 0 and 0? Pin
Richard Deeming16-Dec-19 9:49
communityengineerRichard Deeming16-Dec-19 9:49 
GeneralRe: How many values between 0 and 0? Pin
raddevus16-Dec-19 9:58
communityengineerraddevus16-Dec-19 9:58 
GeneralRe: How many values between 0 and 0? Pin
TheGreatAndPowerfulOz16-Dec-19 10:05
MemberTheGreatAndPowerfulOz16-Dec-19 10:05 
GeneralRe: How many values between 0 and 0? Pin
raddevus16-Dec-19 10:21
communityengineerraddevus16-Dec-19 10:21 
GeneralRe: How many values between 0 and 0? Pin
TheGreatAndPowerfulOz16-Dec-19 11:05
MemberTheGreatAndPowerfulOz16-Dec-19 11:05 
GeneralRe: How many values between 0 and 0? Pin
raddevus16-Dec-19 11:16
communityengineerraddevus16-Dec-19 11:16 
TheGreatAndPowerfulOz wrote:
foreach (var in list) { ... }

Right, in C# it looks like this:
List<int> allInts = new List<int>();
Console.WriteLine($"There are  {allInts.Count} items in the list");
foreach (var x in allInts){
	Console.WriteLine(x);
}
//output : There are  0 items in the list


The code inside the foreach never runs. Again, that is more what I was expecting.
GeneralRe: How many values between 0 and 0? Pin
Richard Deeming17-Dec-19 1:28
communityengineerRichard Deeming17-Dec-19 1:28 
GeneralRe: How many values between 0 and 0? Pin
TheGreatAndPowerfulOz17-Dec-19 6:05
MemberTheGreatAndPowerfulOz17-Dec-19 6:05 
GeneralRe: How many values between 0 and 0? Pin
TheGreatAndPowerfulOz16-Dec-19 10:02
MemberTheGreatAndPowerfulOz16-Dec-19 10:02 
GeneralRe: How many values between 0 and 0? Pin
raddevus16-Dec-19 10:10
communityengineerraddevus16-Dec-19 10:10 
GeneralRe: How many values between 0 and 0? Pin
TheGreatAndPowerfulOz16-Dec-19 11:07
MemberTheGreatAndPowerfulOz16-Dec-19 11:07 
GeneralRe: How many values between 0 and 0? Pin
raddevus16-Dec-19 11:32
communityengineerraddevus16-Dec-19 11:32 
GeneralRe: How many values between 0 and 0? Pin
crystal_gecko19-Dec-19 0:44
Membercrystal_gecko19-Dec-19 0:44 
GeneralRe: How many values between 0 and 0? Pin
Member 798912219-Dec-19 1:28
MemberMember 798912219-Dec-19 1:28 
GeneralRe: How many values between 0 and 0? Pin
TheGreatAndPowerfulOz19-Dec-19 5:36
MemberTheGreatAndPowerfulOz19-Dec-19 5:36 
GeneralRe: How many values between 0 and 0? Pin
Stuart Dootson19-Dec-19 8:52
professionalStuart Dootson19-Dec-19 8:52 
GeneralRe: How many values between 0 and 0? Pin
raddevus19-Dec-19 9:24
communityengineerraddevus19-Dec-19 9:24 
GeneralTo get a %age divide the number by the number of decimal places defined on the column Pin
CHill6013-Dec-19 2:20
mveCHill6013-Dec-19 2:20 
GeneralRe: To get a %age divide the number by the number of decimal places defined on the column Pin
phil.o13-Dec-19 2:38
mvephil.o13-Dec-19 2:38 
GeneralRe: To get a %age divide the number by the number of decimal places defined on the column Pin
CHill6013-Dec-19 2:42
mveCHill6013-Dec-19 2:42 
GeneralRe: To get a %age divide the number by the number of decimal places defined on the column Pin
Marc Clifton13-Dec-19 3:39
communityengineerMarc Clifton13-Dec-19 3:39 
GeneralRe: To get a %age divide the number by the number of decimal places defined on the column Pin
Nelek13-Dec-19 4:04
protectorNelek13-Dec-19 4:04 
GeneralRe: To get a %age divide the number by the number of decimal places defined on the column Pin
Marc Clifton13-Dec-19 5:05
communityengineerMarc Clifton13-Dec-19 5:05 

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.