Interface function C#

Posted by user181421 on Stack Overflow See other posts from Stack Overflow or by user181421
Published on 2010-06-14T15:10:45Z Indexed on 2010/06/14 15:22 UTC
Read the original article Hit count: 305

Filed under:
|
|

Hello, 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.

© Stack Overflow or respective owner

Related posts about c#

Related posts about function