Interview Question in LINQ


 

Interview Question :: I have a paint component in my windows form cSharp program, How can i recall this method? See attached code

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;

namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void onPaint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;

Brush yel = new SolidBrush(Color.Yellow);
Brush grn = new SolidBrush(Color.Green);
Brush blu = new SolidBrush(Color.SkyBlue);

Rectangle sun = new Rectangle(Width-100,15 , 80, 80);
Rectangle grass = new Rectangle(0, 300, Width, Height);
Rectangle sky = new Rectangle(0, 0, Width, Height);


g.FillRectangle(blu, sky);
g.FillRectangle(grn, grass);
g.FillEllipse(yel, sun);
by ksk