IList<ChartModel> list = GetData.GetChartDataListByPie();问题一:IList和List是什么关系???问题二:“IList<ChartModel>”中的“ChartModel”是一个类还是什么???问题三:Ilist的用法,那里有这样的说明吗???

        //数值显示百分比形式
        Chart1.Series["Series1"].Label = "#PERCENT{P}";
        Chart1.Series["Series1"].Points.DataBind(list, "home", "num1", "LegendText=home,YValues=num1,ToolTip=num1");   Chart1.Series["Series1"].ChartType = System.Web.UI.DataVisualization.Charting.SeriesChartType.Pie;        Chart1.Series["Series1"].ToolTip = "#LEGENDTEXT: #VAL{C} million";  Chart1.ChartAreas["ChartArea1"].Area3DStyle.Enable3D = true;

解决方案 »

  1.   

    问题1
    2  ChartModel是T  一个类型。问题3 用法可去MSDN找
      

  2.   

    大家可不可以猜测下,IList<ChartModel> list = GetData.GetChartDataListByPie()中“GetChartDataListByPie()”,应该是怎样写的自己是这样写的:
     public List<object> GetPieChart()
            {
                DataTable dt = new M_BLL.T_Admin().GetPostBackChart();            List<object> lt = new List<object>();
                foreach (DataRow dr in dt.Rows)
                {
                    M_Model.PieChart PieChartModel = new M_Model.PieChart();
                    PieChartModel.post = dr["JSZC"].ToString();
                    PieChartModel.num = dr["NUM"].ToString();
                    lt.Add(PieChartModel);
                }
                return lt;
            }但是:
     PostChart.Series["Series1"].Points.DataBind(new M_BLL.T_Admin().GetPieChart(), "JSZC", "NUM", "LegendText=JSZC,YValues=NUM,ToolTip=NUM");提示错误:
    序列数据点不支持类型为 M_Model.PieChart 的值,只能使用以下类型的值: Double、Decimal、Single、 int、long、uint、ulong、String、DateTime、short、ushort。大家可以猜猜应该怎么写吗???一个大体的实例也行吧
      

  3.   

    IList是接口List是数组,凡是以I打头的基本上都是接口