Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.
C# problem with inherited constructors
{
player = thePlayer;
}```
Ok, so, I believe the code above should be a constructor with the inherited abilities of another program; however, it is giving me compile errors (it says I should add a semicolon).
If anyone can help me, and/or needs to see the whole 200 line program, tell me and I will PM you.
After googling for C# syntax I understand more of what you are trying to do. What you have written seems correct to me, by comparing to this example code found on google:
{
public myBaseClass()
{
// Code for First Base class Constructor
}
public myBaseClass(int Age)
{
// Code for Second Base class Constructor
}
// Other class members goes here
}
public class myDerivedClass : myBaseClass
// Note that I am inheriting the class here.
{
public myDerivedClass()
{
// Code for the First myDerivedClass Constructor.
}
public myDerivedClass(int Age):base(Age)
{
// Code for the Second myDerivedClass Constructor.
}
// Other class members goes here
}```
So maybe there is something wrong in your code just over/under the constructor?
At least here is a small guide on constructors and inheritance in C#:
http://www.codeproject.com/dotnet/ConstructorsInCSharp.asp