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
amber
NA
39
48.2k
Calculated Amount becomes Zero at runtime in C# winform app.
Oct 20 2013 3:51 PM
Hi,
The code m using is:
long eval;
public long Evaluate()
{
k = (scor * 2);
eval = ((k / 100) * 103228);
return eval;
}
on Btn_Evaluate event :
private void button7_Click(object sender, EventArgs e)
{
Evaluate();
MessageBox.Show("Percentage Proposed: " + k + "%" + "\nAmount: " + eval);
}
it shws the eval = 0 everytime i run it but its calculating the percentage proposed "k" correctly.May b m making some silly mistake can anyone help me wd this?? first i click on score btn wich calculates the score and store it in above mentioned "scor" variable then participate in evaluate method is it the right way to do??:
on btn_score:
private void button11_Click(object sender, EventArgs e)
{
score();
if (textBox1.Text != "")
{
MessageBox.Show("The Score is: " + scor);
}
}
Thanx in advance
Reply
Answers (
5
)
c#
rotate a lable in c#