Skip to content

Instantly share code, notes, and snippets.

@dgrunwald
Created May 31, 2015 08:19
Show Gist options
  • Save dgrunwald/507e9ce31ffe12415227 to your computer and use it in GitHub Desktop.
Save dgrunwald/507e9ce31ffe12415227 to your computer and use it in GitHub Desktop.
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