Two things:
First, you put a method inside a namespace:
namespace Prog1
{
public class HistogramControlClass : System.Windows.Forms.UserControl
{ ......
}
public void DrawHistogram(long[] Values)
{
}
}
You can't put a method inside a namespace, you
always have to put it inside a class.
Second,
HistogramEqualization
derives from two classes:
class HistogramEqualization:PNM, HistogramControlClass
This is impossible, because C# does only support multiple inheritance for interfaces. If
PNM
is an interface, then multiple inheritance is possible in this case. If
PNM
is a class, then it is not possible.
Solution
First, put the
DrawHistogram
method inside the
HistogramControlClass
:
namespace Prog1
{
public class HistogramControlClass : System.Windows.Forms.UserControl
{ ......
public void DrawHistogram(long[] Values)
{
}
}
}
Then, solve the multiple inheritance problem. This is only necessary if
PNM
is
not an
interface
. A possible solution is to move the properties/fields/methods of
PNM
to
HistogramControlClass
.
After solving these problems, you'll be able to call
DrawHistogram
in
HistogramEqualization
.