using System;
using System.Collections;
struct RGB
{
public int red;
public int green;
public int blue;
public RGB(int red, int green, int blue)
{
this.red = red;
this.green = green;
this.blue = blue;
}
public override String ToString()
{
return red.ToString("X")
+ green.ToString("X")
+ blue.ToString("X");
}
}
class BoxTest
{
static ArrayList rgbValues;
public static void Main()
{
RGB rgb = new RGB(255, 255, 255);
rgbValues = new ArrayList();
rgbValues.Add(rgb);
Console.WriteLine("The RGB value is {0}", rgb);
}
}
|