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. |