[Mono-bugs] [Bug 382260] Argument incorrect to static callback with same name as instance method

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Apr 22 09:53:36 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=382260

User robertj at gmx.net added comment
https://bugzilla.novell.com/show_bug.cgi?id=382260#c2





--- Comment #2 from Robert Jordan <robertj at gmx.net>  2008-04-22 07:53:36 MST ---
Standalone testcase

using System;

public class StaticDelegateWithSameNameAsInstance
{
    private Provider _provider;
    delegate void Provider(string s);

    Provider MyProvider
    {
        set
        {
            _provider = value;
            if (_provider != null)
            {
                _provider(string.Empty);
            }
        }
    }

     public void StaticCallback()
    {
        MyProvider = StaticCallback;
    }

    public static void StaticCallback(string s)
    {
            Console.WriteLine (s is string);
    }

    static void Main ()
    {
        new StaticDelegateWithSameNameAsInstance ().StaticCallback ();
    }
}


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list