Not sure if my title is correct. Forgot what it is code. But here I will explain it through code.
You see in Java, you can declare a class like this:
class Panel extends View {
public Bitmap mBitmap;
public Panel(Context context) {
super(context);
}
}
In C#:
class Panel : View
{
public Panel(Context context)
{
base(context);
}
}
it throws an error.
How do you declare a class constructor like that in C# ?
class Panel : View
{
public Panel(Context context) : base(context)
{
}
}
MSDN: Using Constructors (C# Programming Guide)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With