|
-
Sep 9th, 2005, 01:22 PM
#1
Thread Starter
Fanatic Member
[RESOLVED] Misc Variable Questions
Hi all,
A few questions came up while I was dabbling in C#:
When naming variables (I guess they're called data now) is it still best practice to use: frmMain, txtUserName, strTemp, intMaxUsers, etc?
I declared my VB6 variables at the beginning of my functions/subs, in the C# code I have seen they are declared where ever needed. What is the best practice for this? I liked having the variables at the beginning of the function, it made it easy to tell what variables I had.
If variable are embedded within a function do you normal try to dispose of them (if you can) as soon as you don't need them anymore or do you just leave them alone until you get out of the function?
Thanks Steve
Last edited by steve65; Sep 11th, 2005 at 07:49 PM.
This space for rent...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|