Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
18
Reply
cannot implicitly convert type string[] to decimal[]
john kanyora
Dec 18 2017 3:16 AM
285
Reply
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);
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
18
)
Next Recommended Forum
Program output c sharp
Important Interview Questions and Answers For ASP.Net MVC