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
Song Lee
NA
47
38.5k
Calling public variable/method from one class to MainForm.cs
Oct 24 2014 7:14 PM
Hello,
I am trying to call:
public double
lose;
public void
LoseWeight()
{
lose = weight -
400
;
}
to
listBox.Items.Add(
"calories : "
+ lose);
//on MainForm.cs
But for some reason, I'm getting
error
: The name "lose" does not exist in the current context.
I thought all public variables and methods can be shared.
Is there a special rule for getting things from class -> MainForm?
thank you :)
Reply
Answers (
2
)
c# codes to Email field values
how to open batabase package MSI by C#