Is this the case to select case?
-
Here's a little jewel I found in the source code of a module I bought (just changed querystring parameter and variable names)
If Request.QueryString("queryParam") <> Nothing Then
Select Case Convert.ToInt16(Request.QueryString("queryParam"))
Case 1
var = 1
Case 2
var = 2
Case 3
var = 3
Case 4
var = 4Case 5 var = 5 Case 6 var = 6 End Select
Else
Hopefully the possible values of the parameter won't grow in future :)
-
Here's a little jewel I found in the source code of a module I bought (just changed querystring parameter and variable names)
If Request.QueryString("queryParam") <> Nothing Then
Select Case Convert.ToInt16(Request.QueryString("queryParam"))
Case 1
var = 1
Case 2
var = 2
Case 3
var = 3
Case 4
var = 4Case 5 var = 5 Case 6 var = 6 End Select
Else
Hopefully the possible values of the parameter won't grow in future :)
-
No, this is not terrible, it's good... it made me laugh!! :)
-
Here's a little jewel I found in the source code of a module I bought (just changed querystring parameter and variable names)
If Request.QueryString("queryParam") <> Nothing Then
Select Case Convert.ToInt16(Request.QueryString("queryParam"))
Case 1
var = 1
Case 2
var = 2
Case 3
var = 3
Case 4
var = 4Case 5 var = 5 Case 6 var = 6 End Select
Else
Hopefully the possible values of the parameter won't grow in future :)
I saw something similar at Computer Stupidities (about halfway down the page). This is worse, though, because one wouldn't expect such atrocities from professionals.
-
Here's a little jewel I found in the source code of a module I bought (just changed querystring parameter and variable names)
If Request.QueryString("queryParam") <> Nothing Then
Select Case Convert.ToInt16(Request.QueryString("queryParam"))
Case 1
var = 1
Case 2
var = 2
Case 3
var = 3
Case 4
var = 4Case 5 var = 5 Case 6 var = 6 End Select
Else
Hopefully the possible values of the parameter won't grow in future :)
-
I saw something similar at Computer Stupidities (about halfway down the page). This is worse, though, because one wouldn't expect such atrocities from professionals.
I'm consider myself far from being a gur at programming, but those things make me cry.. I still have to understand if it's sadness or joy!! :D Thank's for the link
-
I might offend, I'm also a vb guy!! :D At least, a I try to be as [C]sharp minded as possible :)
-
I might offend, I'm also a vb guy!! :D At least, a I try to be as [C]sharp minded as possible :)
-
I might offend, I'm also a vb guy!! :D At least, a I try to be as [C]sharp minded as possible :)
Alberto Biasiutti wrote:
I'm also a vb guy!!
We'll. Speak. Slowly. Then. :laugh: I worked in VB for about 15 years and I am pleased to have escaped. For now.
Panic, Chaos, Destruction. My work here is done. Drink. Get drunk. Fall over - P O'H OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
-
Alberto Biasiutti wrote:
I'm also a vb guy!!
We'll. Speak. Slowly. Then. :laugh: I worked in VB for about 15 years and I am pleased to have escaped. For now.
Panic, Chaos, Destruction. My work here is done. Drink. Get drunk. Fall over - P O'H OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
Every time I come to CP, I feel dirty because I use VB! I'll denounce you for discrimination!
-
Alberto Biasiutti wrote:
I'm also a vb guy!!
We'll. Speak. Slowly. Then. :laugh: I worked in VB for about 15 years and I am pleased to have escaped. For now.
Panic, Chaos, Destruction. My work here is done. Drink. Get drunk. Fall over - P O'H OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
Nagy Vilmos wrote:
I worked in VB for about 15 years
That explains the lunchtime drinking... :laugh:
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Manfred R. Bihy: "Looks as if OP is learning resistant."
-
Nagy Vilmos wrote:
I worked in VB for about 15 years
That explains the lunchtime drinking... :laugh:
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Manfred R. Bihy: "Looks as if OP is learning resistant."
OriginalGriff wrote:
That explains the lunchtime drinking.
No, that was the early part of career working in COBOL. VB is responsible for the night time drinking. :-D
Panic, Chaos, Destruction. My work here is done. Drink. Get drunk. Fall over - P O'H OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett