c# - IntelliSense do not work with extension method when property name is the same as class name -


based on answer: " should property have same name type? ", i've started use property names same class names. i've met strange corner case , don't know if problem , how solve it. here code repeat case:

class r {     public test test { get; private set; }      public r()     {         test = new test();          // intellisense not working here:         // test.use(     } }  public class test     {  }  public static class extensions {     public static void use(this test test, string msg)     {         console.writeline(msg);     } } 

i'm using vs2010 , .net framework 4.0

here video showing problem: http://www.youtube.com/watch?v=hgszau_pir0&feature=youtu.be

could try using .this when selecting property?
eg. this.test.use() ..


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -