I've started learning C#, but now i'm a little confused, because there i have some problem. I'm trying to do the inheritance of one class to another and it's not working. It says something like "You have no right parameter" So, there is the code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication15 // Base class
{
public class cakes
{
public int cakes_for;
public cakes(int number) // constructor
{
cakes_for = number;
}
public int cakes_get // get value
{
get
{
return cakes_for;
}
set
{
cakes_for = value;
}
}
public static int cakes_plus_number(int n) // number plus constant
{
return n + 42;
}
}
}
namespace ConsoleApplication15 // Derived Class
{
public class Class2 : cakes // inheritance test
{
public int cakeses;
public int Size { get; set; }
}
}