Method binding to base method in external library can't handle new virtual methods “between”

后端 未结 2 1727
闹比i
闹比i 2021-02-08 12:27

Lets say I have a library, version 1.0.0, with the following contents:

public class Class1
{
    public virtual void Test()
    {
        Console.WriteLine( \"Li         


        
2条回答
  •  Happy的楠姐
    2021-02-08 13:17

    This was the subject of my blog on March 29th:

    http://blogs.msdn.com/ericlippert/archive/2010/03/29/putting-a-base-in-the-middle.aspx

    Turns out that C# 1.0 did it your way, and that this decision causes some interesting crashes and performance problems. We switched it to do it the new way in C# 2.0.

    I learned a lot from this question. See the blog for details.

提交回复
热议问题