• 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/MjM2

Related Code
Non-virtual interface methods

Non-virtual Dispose methods

Shows how C# behaves when interface methods are reimplemented on derived types.

0
149 0 0 0 0 0

class A : IDisposable { public 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:47 PM

Fork

 Non-virtual Dispose methods - Steven Wednesday 01, 2010 6:47 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