TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
abdelwaheb ammar
1.3k
457
124k
protected property of parent class
Nov 30 2015 5:24 AM
Hello I use a parent class property called "Contribuable" and then I called in a derived class called "ContribuableMoral" during execution but it appears to me in the null derived class method.
public class contribuable
{
protected string MATRICULE_FISCALE;
public contribuable(string _matricule_fiscale)
{
this.MATRICULE_FISCALE = _matricule_fiscale; //example MATRICULE_FISCALE=123456789
}
public void insertContribuable()
{
string sql = "insert into CLIENT (MATRICULE_FISCALE)values('" +this.MATRICULE_FISCALE +"')"; //MATRICULE_FISCALE=123456789
}
}
class ContribuableMoral:contribuable
{
public ContribuableMoral()
{
}
public void InsertionMorale()
{
string sqlMorale = "insert into CLIENT_MORALE(MATRICULE_FISCALE) values('" + MATRICULE_FISCALE + "')"; //MATRICULE_FISCALE=null
}
}
normally ownership relatives told the class can be called to the derived class?!!!!!!!!!!!
Reply
Answers (
3
)
child class constructor
how to get excel data and convert Xml and save existing Xml