Yeah, sorry about asking a stupid n00b question. So I have a C# program. I have a class
class foo
{
public int bar, wee, someotherint, someyetanotherint;
public foo()
{
this.bar = 1:
this.wee = 12;
this.someotherint = 1231;
this.someyetanotherint = 443;
}
}
And I want to make a class called spleen that inherits from foo
class spleen : foo
{
}
What is the quickest, easiest syntax to make the class spleen inherit the constructor from foo without having to copy/paste the entire constructor from foo? I don't want to hear that I already have too many parameters. I already know that. (edit: Actually, no. I'm an idiot) I know I should probably somehow call the parent constructor, but I don't know how. How do I do that.
Edit: I realize now that I should have taken more time to write my question. It looks like I was trying to ask two questions at the same time without realizing it (how to inherit constructors with no parameters, and how to inherit constructors with parameters) , and somehow jumbled it all up. However the answers provided were very helpful and solved my problem. Thanks, and sorry for being such an idiot!