c# - how is property Target of Func<> set? -


when creating new func<> value of target property?

im creating func object in constructor of class has base class b. in b compare objects :

func.target != this

which true..

and dont understand why not false..

thanks

maybe can help:

    static void main(string[] args)     {         program p = new program();         p.mainimpl();     }      public void mainimpl() {         func<string> f = null;         program _this = this;         f = () => {                 console.writeline(this == f.target);                 console.writeline(this == _this); return null;          };         //prints "false true"         f();     } 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -