• Code
  • Tags
  • Users
  • Titles
  • Log in
  • Feedback
  • FAQ
Share Code
Welcome to ForkCan.com

ForkCan is all about sharing code in a social way.

Discuss, debate or argue with other devs about their or your own code.

Give other devs feedback or make a Fork (Make a better version of a shared code).

Rate the code, if you use the code mark it as used so others can see if the shared code is used by someone.

Help each other to be better devs and to be more productive.


Features not working yet:

Flag a post


QR Code

Tiny Url

http://4kcan.com/s/MjM3

Related Code
Non-virtual Dispose methods

Non-virtual interface methods

Shows how interface methods behave when reimplemented in derived classes

0
209 0 0 0 0 0

class A : IDisposable
{
    public virtual void Dispose()
    {
        Console.WriteLine("A disposed");
    } 
}
public class B : A, IDisposable
{ 
    void IDisposable.Dispose()
    {
        Console.WriteLine("B disposed");
        base.Dispose();
    }
}

// Use
A a = new B();

a.Dispose(); // Outputs: A disposed

Share: twitter | facebook   Action: used | fork | flag

c#

Mark 'c#' tag as 'like'

Mark 'c#' tag as 'ignore'

idisposable

Mark 'idisposable' tag as 'like'

Mark 'idisposable' tag as 'ignore'


 Steven
500
September 01, 2010 6:49 PM

Fork

 Non-virtual interface methods - Steven Wednesday 01, 2010 6:49 PM


0 Feedback


You must log in before you can give any feedback


0 Discussion(s)

Newest Oldest

You must log in before you can post a comment

Squeed
Made by: Fredrik Normén 2010