Demo entry 6625842

C#

   

Submitted by anonymous on Jun 22, 2017 at 10:10
Language: C#. Code size: 545 Bytes.

namespace ParkingLot
{
    class Road
    {
        public int spaceStartNum;
        public int spaceEndNum;
        Point start;
        Point end;
        static Color color = Color.DarkOrchid;

        public Road(int starNum, int endNum, Point p1, Point p2)
        {
            spaceStarNum = startNum;
            spaceEndNum = endNum;
            start = p1;
            end = p2;
        }
        public void Paint(Graphics g)
        {
            g.DrawLine(new Pen(color, 15), start, end);
        }
    }
}

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).