Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 A bug in "encapsulate field"
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

enigma
Senior Member

49 Posts

Posted - Jun 14 2007 :  04:00:14 AM  Show Profile  Reply with Quote

  • Open vs.net 2003. Create a class in a c# project. Type in the following line:
    private readonly string timerHardlockID;

  • Choose "encapsulate field"

  • Observed:

    public readonly string TimerHardlockID
    {
    get{return timerHardlockID;}
    set{timerHardlockID = value;}
    }


  • Expected:
    public string TimerHardlockID
    {
    get { return timerHardlockID; }
    }



http://itscommonsensestupid.blogspot.com/

Edited by - enigma on Jun 14 2007 04:01:30 AM

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Jun 14 2007 :  07:47:03 AM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=2026

Currently VA just uses the autotext entry "Refactor Encapsulate Field" and inserts everything. Obviously it would be more useful if it only inserted the "get" function on a readonly field.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000