I have a function which implement an interface. something like this:
string IMyInterface.MyFunction()
{
do something;
}
This function is available outside of my class. All working perfect.
Now I also need to call this function from another LOCAL non public function. like this:
void Func2()
{
string s;
s = MyFunction();
}
The problem is I get this error:
“the name MyFunction does not exist in the current context local”
Any help will be appreciated.
TY.
You’ve implemented the interface method explicitly.
Cast “this” to the interface, and you’re there: