English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

C#.Net 2
======
I have created a base class called clsCommon which will be use in every classes. I have inharited as follows.

public class otherClass:clsCommon
{

}

But here i am facing one problem that instead of inheritance of clsCommon its public function is not showing in other classes.

HOW CAN I DIRECTLY ACCESS clsCommon CLASS FUNCTION IN OTHER CLASSES WITHOUT AFFECTING PROCESS OF clsCommon CLASS FUNCTION


Thanks in advance

2007-01-31 07:50:30 · 1 answers · asked by Jack J 1 in Computers & Internet Programming & Design

1 answers

You need to create some type of function first like
public class otherClass:clsCommon
{
public void myFunction (int someInt)
{
this.aclsCommonFunction(); // should access the parent class function
} // end of function
}// end of class

and in the function definition you can also override the parent class' function.

RJ

2007-01-31 08:07:48 · answer #1 · answered by Anonymous · 0 0

fedest.com, questions and answers