C
Chris LaJoie
I wrote a class in VB that inherits from a MenuItem, but I'm having
difficulty converting it to C#.
this VB is the code that must be converted:
Public Sub New()
MyBase.New()
Me.OwnerDraw = True
End Sub
That vb code works perfectly fine, and does what it's supposed to (invoke
the constructor of the base class)
here's the code I came up with for C#:
public MenuEx() {
base = new MenuItem();
this.OwnerDraw = true;
}
this code does not compile. The error is "use of keyword 'base' is not
valid in this context".
Anyone have any suggestions?
Chris LaJoie
difficulty converting it to C#.
this VB is the code that must be converted:
Public Sub New()
MyBase.New()
Me.OwnerDraw = True
End Sub
That vb code works perfectly fine, and does what it's supposed to (invoke
the constructor of the base class)
here's the code I came up with for C#:
public MenuEx() {
base = new MenuItem();
this.OwnerDraw = true;
}
this code does not compile. The error is "use of keyword 'base' is not
valid in this context".
Anyone have any suggestions?
Chris LaJoie