Click here to Skip to main content
16,006,845 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionVariables Naming Pin
Samir Ibrahim11-Feb-09 20:28
Samir Ibrahim11-Feb-09 20:28 
AnswerRe: Variables Naming Pin
Chetan Patel11-Feb-09 22:27
Chetan Patel11-Feb-09 22:27 
GeneralRe: Variables Naming Pin
Samir Ibrahim12-Feb-09 0:20
Samir Ibrahim12-Feb-09 0:20 
AnswerRe: Variables Naming Pin
Guffa12-Feb-09 0:57
Guffa12-Feb-09 0:57 
Using a prefix to specify an aspect of a variable is called hungarian notation. It was originally intended for more important aspects than the variable type, but in a language where strict typing is not available it's quite useful to use it for the variable type.

In VB.NET you should not only use OPTION EXPLICIT ON, but also OPTION STRICT ON. That protects you from doing unintended implicit conversions, like assigning a string to an integer variable.

As you then have strict typing, there isn't really any need to use hungarian notation to keep track of the data types. Don't clutter up the variable names with information that's not really needed. If you use hungarian notation you should use it for something that it was intended for in the beginning, like separating validated (safe) data from unvalidated (unsafe) data.

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

GeneralRe: Variables Naming Pin
Samir Ibrahim12-Feb-09 1:40
Samir Ibrahim12-Feb-09 1:40 
GeneralRe: Variables Naming Pin
Dave Kreskowiak12-Feb-09 1:44
mveDave Kreskowiak12-Feb-09 1:44 
GeneralRe: Variables Naming Pin
Samir Ibrahim12-Feb-09 2:18
Samir Ibrahim12-Feb-09 2:18 
GeneralRe: Variables Naming Pin
Jon_Boy12-Feb-09 7:48
Jon_Boy12-Feb-09 7:48 
GeneralRe: Variables Naming Pin
Samir Ibrahim12-Feb-09 9:45
Samir Ibrahim12-Feb-09 9:45 
QuestionCrystal report problem Pin
mahalakshmi4211-Feb-09 19:54
mahalakshmi4211-Feb-09 19:54 
QuestionHow to apply Read lock to Record in VB 6.0 Pin
Jhanvy Thaker11-Feb-09 18:45
Jhanvy Thaker11-Feb-09 18:45 
AnswerRe: How to apply Read lock to Record in VB 6.0 Pin
Vimalsoft(Pty) Ltd11-Feb-09 22:47
professionalVimalsoft(Pty) Ltd11-Feb-09 22:47 
AnswerRe: How to apply Read lock to Record in VB 6.0 Pin
Prasadsm11-Feb-09 23:02
Prasadsm11-Feb-09 23:02 
AnswerRe: How to apply Read lock to Record in VB 6.0 Pin
Dave Kreskowiak12-Feb-09 1:42
mveDave Kreskowiak12-Feb-09 1:42 
QuestionFilter percent (%) and apostrophes (') contained in a string Pin
mbv80011-Feb-09 16:54
mbv80011-Feb-09 16:54 
AnswerRe: Filter percent (%) and apostrophes (') contained in a string Pin
paas12-Feb-09 1:06
paas12-Feb-09 1:06 
AnswerRe: Filter percent (%) and apostrophes (') contained in a string Pin
Guffa12-Feb-09 1:33
Guffa12-Feb-09 1:33 
QuestionRubber Banding in VB 2008 Pin
StefanGeorgiev11-Feb-09 16:45
StefanGeorgiev11-Feb-09 16:45 
AnswerRe: Rubber Banding in VB 2008 Pin
Ranjit Viswakumar11-Feb-09 17:29
Ranjit Viswakumar11-Feb-09 17:29 
GeneralRe: Rubber Banding in VB 2008 Pin
Guffa12-Feb-09 1:41
Guffa12-Feb-09 1:41 
AnswerRe: Rubber Banding in VB 2008 Pin
Guffa12-Feb-09 1:39
Guffa12-Feb-09 1:39 
QuestionAdding web-address to menustrip and access from there. Pin
Gagan.2011-Feb-09 16:26
Gagan.2011-Feb-09 16:26 
AnswerRe: Adding web-address to menustrip and access from there. Pin
Dave Kreskowiak13-Feb-09 3:42
mveDave Kreskowiak13-Feb-09 3:42 
Questiongrouping subroutines Pin
Duane195811-Feb-09 15:58
Duane195811-Feb-09 15:58 
GeneralRe: grouping subroutines Pin
Luc Pattyn11-Feb-09 16:32
sitebuilderLuc Pattyn11-Feb-09 16:32 

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.