static void Main(string[] args) { DefaultValues dv = new DefaultValues(); Console.WriteLine("byte={0}", dv.b); Console.WriteLine("sbyte={0}", dv.sb); Console.WriteLine("short={0}", dv.s); Console.WriteLine("ushort={0}", dv.us); Console.WriteLine("int={0}", dv.i); Console.WriteLine("uint={0}", dv.ui); Console.WriteLine("long={0}", dv.l); Console.WriteLine("ulong={0}", dv.ul); Console.WriteLine("float={0}", dv.f); Console.WriteLine("double={0}", dv.d); Console.WriteLine("char={0}", dv.ch); Console.WriteLine("bool={0}", dv.bo); Console.WriteLine("decimal={0}", dv.dec); Console.WriteLine("string={0}", dv.str); Valori v = new Valori(); SmartPhone sp = new SmartPhone { Marca = "" }; Console.ReadLine(); }
void Desenare(Graphics g, Rectangle r) { g.FillRectangle(Brushes.White, r); if (valori.Length == 0) { return; } float W = r.Width, H = r.Height; int n = valori.Length; float w = W / n, f = H * 0.9f / Valori.Max(); for (int i = 0; i < n; i++) { float hi = Valori[i] * f; RectangleF rElem = new RectangleF(x: i * w + 0.1f * w + r.Left, y: H - hi + r.Top, width: w * 0.8f, height: hi); g.FillRectangle(Brushes.LightCoral, rElem); g.DrawRectangle(Pens.Black, Rectangle.Round(rElem)); } }