Click here to Skip to main content

Welcome to the Lounge

   

For lazing about and discussing anything in a software developer's life that takes your fancy.
The Lounge is rated PG. If you're about to post something you wouldn't want your kid sister to read then don't post it. No flame wars, no abusive conduct and please don't post ads.

Technical discussions are welcome, but if you need specific help please use the programming forums.


 
GeneralChrome on Ubuntu PinmemberHomerTheGreat20-Jun-14 12:03 
QuestionRe: Chrome on Ubuntu PinprofessionalEddy Vluggen20-Jun-14 12:17 
GeneralRe: Chrome on Ubuntu PinmemberWuRunZhe22-Jun-14 1:01 
GeneralThis is a programming question PinmemberPIEBALDconsult20-Jun-14 11:23 
Well, almost a programming question; it concerns VB. Big Grin | :-D But it's really just for a bit of procrastination and VB-bashing on a Friday afternoon.
 
Usually (in C#), when I want to log an Exception with its InnerException(s), I use a while loop:
 
while ( exception != null )
{
  ...
 
  exception = exception.InnerException ;
}
 
But today* I decided to try a for loop instead:
 
for ( System.Exception exc = exception.InnerException ; exc != null ; exc = exc.InnerException )
{ 
  ... 
}
 
Which, of course works quite well. But VB doesn't support that construct, does it? So you're stuck using a while loop?
 
Jig | [Dance] Suckers! Jig | [Dance]
 

* Yesterday I wrote it with recursion. Laugh | :laugh:
You'll never get very far if all you do is follow instructions.

GeneralRe: This is a programming question PinmemberHomerTheGreat20-Jun-14 11:35 
GeneralRe: This is a programming question [modified] PinmemberPIEBALDconsult20-Jun-14 12:18 
GeneralRe: This is a programming question PinmemberNeverJustHere20-Jun-14 11:42 
GeneralRe: This is a programming question PinmemberPIEBALDconsult20-Jun-14 12:17 
GeneralRe: This is a programming question PinprotectorMarc Clifton21-Jun-14 7:04 
GeneralRe: This is a programming question PinprofessionalEddy Vluggen20-Jun-14 11:48 

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

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


Advertise | Privacy | Mobile
Web04 | 2.8.141216.1 | Last Updated 19 Dec 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid