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
john kanyora
NA
242
46.6k
cannot implicitly convert type string[] to decimal[]
Dec 18 2017 3:16 AM
Hi, am trying to get my values in a bar chart be in the fromat of currency.am using the code below but am now getting an error that " cannot implicitly convert type string[] to decimal[].
the error is in the line of code i have highlighted.please kindly help.
string[] x = new string[dt.Rows.Count];
string[] y = new string[dt.Rows.Count];
for (int i = 0; i<dt.Rows.Count; i++)
{
x[i] = dt.Rows[i][0].ToString();
y[i] = string.Format("{0:##,##0.00}", dt.Rows[i][1].ToString());
}
BarChart1.Series.Add(new AjaxControlToolkit.BarChartSeries
{ Data = y}
);
BarChart1.CategoriesAxis = string.Join(",", x);
Reply
Answers (
18
)
Program output c sharp
Important Interview Questions and Answers For ASP.Net MVC