Skip to content

[csharp] Delegate propagation fails #20255

Answered by hvitved
Hug0Vincent asked this question in Q&A
Discussion options

You must be logged in to vote

Hi.

Thanks for your question. This is a known limitation of how we resolve delegate calls (we do not track delegates stored in collections). If it instead had been

    class DelegateRegistry
    {
        public static readonly SimpleDelegate d = null;

        public static void Register(SimpleDelegate del)
        {
            d = del;
        }
    }

then it ought to work (we do track delegates stored in fields).

I have been wanting to improve this for some time, but it has not yet been a priority.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@Hug0Vincent
Comment options

Comment options

You must be logged in to vote
1 reply
@Hug0Vincent
Comment options

Answer selected by Hug0Vincent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants