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
Mfwamba Tshimanga
NA
155
46.2k
converting my textbox in decimal mode...
Dec 11 2014 7:37 AM
Hi!
I need to convert all my textbox in decimal number. Even at the final result should appear ONLY with at least the two decimals number at maximum (for instance 7845,56).
This is my codes:
private void txtPreco1Retalho_KeyUp(object sender, KeyEventArgs e)
{
if (string.IsNullOrEmpty(txtPreco1Retalho.Text))
{
return;
}
double preco1;
double preco2;
double preco3;
double resultp1p2p3;
preco1 = Convert.ToDouble(txtPreco1Retalho.Text);
preco2 = Convert.ToDouble(txtPreco2Retalho.Text);
preco3 = Convert.ToDouble(txtPreco3Retalho.Text);
resultp1p2p3 = (preco1 + preco2 + preco3) / 3;
txtMediaRetalho.Text = resultp1p2p3.ToString();
}
Reply
Answers (
4
)
want help to print string looping in c#
Number separated please