Click here to Skip to main content
15,911,531 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Basic looping problem Pin
kanchoette6-Feb-09 2:43
kanchoette6-Feb-09 2:43 
GeneralRe: Basic looping problem Pin
Henry Minute6-Feb-09 2:52
Henry Minute6-Feb-09 2:52 
AnswerRe: Basic looping problem Pin
Mr Oizo6-Feb-09 3:12
Mr Oizo6-Feb-09 3:12 
GeneralRe: Basic looping problem Pin
Guffa6-Feb-09 7:53
Guffa6-Feb-09 7:53 
AnswerRe: Basic looping problem Pin
nlarson116-Feb-09 8:14
nlarson116-Feb-09 8:14 
AnswerRe: Basic looping problem Pin
Guffa7-Feb-09 5:24
Guffa7-Feb-09 5:24 
GeneralRe: Basic looping problem Pin
Samir Ibrahim7-Feb-09 5:49
Samir Ibrahim7-Feb-09 5:49 
GeneralRe: Basic looping problem Pin
Guffa7-Feb-09 8:59
Guffa7-Feb-09 8:59 
Thecaptin wrote:
#1 You mention above in previous reply that using Now recursively is not best practice,
Can i know why.


The value returned from Now changes, so it could for example be 2008-12-31 23:59:59 when you call it the first time and 2009-01-01 00:00:00 the next. In your case there is a very low risk for this to happen, and it would only result in the wrong number of items in the list, but there are situations where this is much more likely to happen, and where it will have a much more serious result. That is why it's a bad practice to call the Now method repeatedly.

Thecaptin wrote:
#2 Is using .net convert function such as x.ToString is better than CStr(x) ? and why.


The CStr function only does some type checking and then it calls the ToString method, so the difference it quite small.

Some will say that you should use the functions in VB, some will say that you should use the function in the framework. I lean towards the later. VB is now an object oriented language, so the Integer type has a method for converting it to a string. You don't need another function that in the end just calls the method in the Integer class anyway.

Despite everything, the person most likely to be fooling you next is yourself.

GeneralRe: Basic looping problem Pin
Samir Ibrahim10-Feb-09 2:41
Samir Ibrahim10-Feb-09 2:41 
GeneralRe: Basic looping problem Pin
Guffa10-Feb-09 6:43
Guffa10-Feb-09 6:43 
GeneralRe: Basic looping problem Pin
Samir Ibrahim10-Feb-09 7:31
Samir Ibrahim10-Feb-09 7:31 
QuestionGroupbox problem Pin
cstrader2326-Feb-09 2:20
cstrader2326-Feb-09 2:20 
AnswerRe: Groupbox problem Pin
JoeSharp6-Feb-09 2:42
JoeSharp6-Feb-09 2:42 
GeneralRe: Groupbox problem Pin
cstrader2326-Feb-09 3:13
cstrader2326-Feb-09 3:13 
GeneralRe: Groupbox problem [modified] Pin
Rekless3-Jan-10 14:00
Rekless3-Jan-10 14:00 
Questionworking with Crystal Report with VB 6 Pin
jayachandra.c6-Feb-09 2:14
jayachandra.c6-Feb-09 2:14 
Questionfile recovery Pin
cst_kvp6-Feb-09 1:52
cst_kvp6-Feb-09 1:52 
AnswerRe: file recovery Pin
EliottA6-Feb-09 2:45
EliottA6-Feb-09 2:45 
GeneralRe: file recovery Pin
Luc Pattyn6-Feb-09 9:30
sitebuilderLuc Pattyn6-Feb-09 9:30 
AnswerRe: file recovery Pin
Dave Kreskowiak6-Feb-09 3:43
mveDave Kreskowiak6-Feb-09 3:43 
AnswerRe: file recovery Pin
0x3c06-Feb-09 8:17
0x3c06-Feb-09 8:17 
QuestionDataGridView selection back color problem Pin
Jay Royall5-Feb-09 23:44
Jay Royall5-Feb-09 23:44 
GeneralGenerating codes for fingerprint security door using VB.Net Pin
awoyale5-Feb-09 22:21
awoyale5-Feb-09 22:21 
GeneralRe: Generating codes for fingerprint security door using VB.Net Pin
Smithers-Jones6-Feb-09 0:24
Smithers-Jones6-Feb-09 0:24 
QuestionCombo Box Frustration Pin
shoorrock5-Feb-09 18:43
shoorrock5-Feb-09 18:43 

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.