![]() |
| ||
| have a problem with inheritance I built two different classes and I want that one class get inherit from another , but when I build Constructions Compiler throw me an Error. I get to conclusion that i must use base function so I build Constructor like this one : public name_class:base() my question what do I put between parentheses and if my syntax o.k and what is the right way to built such constructor Thanks, sergey |
| ||
| Re: have a problem with inheritance Have you tried: public class Child : Parent |
| ||
| Re: have a problem with inheritance Quote:
public Name_of Chuld (type_of_variable name_of_it):base(name_of_this_variable_in_Parent) and when I call for parent function : base.Name_ofParentFunction(); are the other way of doing so, and how it will look like for calling Parent function that get's some variables from Main for example ? Thanks Sergey |
| ||
| Re: have a problem with inheritance OK but if you had class MyClass You would call this in your inherited with public MyNewClass : MyClass |
| ||
| Re: have a problem with inheritance Thank LizR |
| All times are GMT -4. The time now is 2:14 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC