0

I created a new method:

private static void FillCircle(this Graphics g, Brush brush,
                              PointF center, float radius)
        {
            g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
            g.FillEllipse(brush, center.X - radius, center.Y - radius,
                                 radius + radius, radius + radius);
        }

But getting on the main form class name error:

namespace mws
{
    class DopplerRadar

The error is on the DopplerRadar

Severity Code Description Project File Line Suppression State Error CS1106 Extension method must be defined in a non-generic static class

If i change for example the FillCircle method to:

private void test()
{

}

I'm not getting any errors.

Moses Meteor
  • 365
  • 3
  • 12

1 Answers1

0

change

public class DopplerRadar

to

public static class DopplerRadar
Rai Vu
  • 1,595
  • 1
  • 20
  • 30