Created
May 31, 2015 08:19
-
-
Save dgrunwald/507e9ce31ffe12415227 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
class Program | |
{ | |
public static void Main() | |
{ | |
var la = new B2(); | |
int ha; | |
la.M(out ha); | |
la.M(ref ha); | |
Console.ReadKey(); | |
} | |
public class B | |
{ | |
public virtual void M(ref int l) | |
{ | |
Console.WriteLine(l); | |
} | |
} | |
public class B1 : B | |
{ | |
public virtual void M(out int l) | |
{ | |
l = 1; | |
} | |
} | |
class B2 : B1 | |
{ | |
public override void M(ref int l) | |
{ | |
base.M(ref l); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment