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
tdiddy67
NA
9
0
New user. Variables question.
Oct 20 2004 12:21 PM
Hello, I've just started learning C# and I'm having some troubles getting a grip on how variables are used. I've building a web app to access a SQL database to retrieve data, and insert data. I built it using a tutorial I found in the Microsoft help files. Anyway, what I want to do is retrieve data from some fields in a table, store the values in variables, and then re-write the values to a table. I declared a variable at the beginning of the class... public String Qty; ...and I'm able to use the variable in any method. However, I want to be able to add a value to the variable in one method, and then use it in another method to insert data to the table. I'm unable to retain the value outside of the method that it is assigned in. Any insight would be greatly appreciated.
Reply
Answers (
7
)
Reading Files Names
How to Sink Managed C# Events in Internet Explorer Script