S
sck10
Hello,
How do you reference an array in the App_Code section? I tried using
SystemColors, but got the error:
'System.Drawing.SystemColors' is a 'type' but is used like a 'variable'.
Thanks, sck10
CodeFile
------------------
for(int i = 0; i < dtSearch.Rows.Count; i++)
{
myCurve.Bar.Fill = new Fill(SystemColors);
}
Class in App_Code section
-----------------------------
public class List
{
using System.Drawing;
public static Color[]
SystemColors =
{
Color.Blue,
Color.Red,
Color.Yellow,
Color.Green,
Color.White,
Color.Cyan,
Color.Magenta,
Color.DarkBlue,
Color.DarkCyan,
Color.DarkGray,
Color.DarkKhaki,
Color.DarkMagenta,
};
}
How do you reference an array in the App_Code section? I tried using
SystemColors, but got the error:
'System.Drawing.SystemColors' is a 'type' but is used like a 'variable'.
Thanks, sck10
CodeFile
------------------
for(int i = 0; i < dtSearch.Rows.Count; i++)
{
myCurve.Bar.Fill = new Fill(SystemColors);
}
Class in App_Code section
-----------------------------
public class List
{
using System.Drawing;
public static Color[]
SystemColors =
{
Color.Blue,
Color.Red,
Color.Yellow,
Color.Green,
Color.White,
Color.Cyan,
Color.Magenta,
Color.DarkBlue,
Color.DarkCyan,
Color.DarkGray,
Color.DarkKhaki,
Color.DarkMagenta,
};
}