C# call interface method within class

Posted by 0xDEAD BEEF on Stack Overflow See other posts from Stack Overflow or by 0xDEAD BEEF
Published on 2010-05-10T19:58:33Z Indexed on 2010/05/10 20:04 UTC
Read the original article Hit count: 337

Filed under:
|
|
|
interface ILol
{
   void LOL();
}

class Rofl : ILol
{
   void ILol.LOL()
   {
      GlobalLOLHandler.RaiseROFLCOPTER(this);
   }
   public Rofl()
   {
      //Is there shorter way of writing this or i is there "other" problem with implementation??
      (this as ILol).LOL();
   }
}

© Stack Overflow or respective owner

Related posts about c#

Related posts about interface