Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 A bug in "encapsulate field"

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
enigma Posted - Jun 14 2007 : 04:00:14 AM

  • 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; }
    }


1   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jun 14 2007 : 07:47:03 AM
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.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000