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
selva kumar
NA
557
189.2k
error while round the value?
Oct 15 2013 8:29 AM
the following error occured while round the value ("Index was outside the bounds of the array.")
my code behind is..
double present = Convert.ToDouble(upnoodP.Text);
double X = 100;
double totaldays = Convert.ToDouble(uptwd.Text);
double total = (present * X) / totaldays;
string[] str = total.ToString().Split('.');
double no1 = Convert.ToDouble("0." + str[1]);
double result;
if (no1 < 0.51)
{
result = Math.Floor(total);
uppercent.Text = Convert.ToString(result) + "%";
}
else
{
result = Math.Round(total);
uppercent.Text = Convert.ToString(result) + "%";
}
how to resolve this error...
Reply
Answers (
4
)
Create Tooltip like gmail in asp.net
GET vs POST