TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
John Burns
NA
120
109.2k
memory management and variables
Jan 2 2011 6:37 AM
hey guys
i have a small windows forms app with a simple seies of textboxes of int data type (which i created using the local database) and a button.
when i click the button it will simply fill the textboxes with text data
thing is should i be assigning everything to variables first and then using the variable or should i just stick to directly assigning values to the objects? here is an example of what i mean:
total_OutgoingTextBox.Text = "35";
can i do this? it sure does work but i was thinking, should i be assigning this to a variable first then using the variable instead?
if so i wasnt quite sure how that would be done, here was my attempt to do it (it didnt work though but could find no other way) ... :(
string tb1 = total_OutgoingTextBox.Text.ToString();
tb1 = "35";
why wont this work? i even tried taking out the .Text as well. it will compile ok but wont populate the textbox with the 35 i want.
thanks
Reply
Answers (
8
)
How to use Array.IndexOf() to search a column in a datatable
trouble inserting dattime in ms access