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
 Idea: HotKey for Stubbing out Properties
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

John_H_Bergman
Tomato Guru

USA
198 Posts

Posted - Jan 21 2004 :  12:31:58 AM  Show Profile
Here is what I would like to see... (My language of choice is C#).

string strName;

or

string strName="some string";

I'd like to highlight the 'string strName' and have the following happen upon command.

private string m_strName="some string";

public string Name
{
get
{
return this.m_strName;
}
set
{
this.m_strName=value;
}
}


I have changed the text to red where Items are added into the code. (Purple was the extra stuff on the line highlighted) Of course, one is always welcome to add the XmlComment header for the property as well

Ideally, this would be implemented as an expansion on the autotext, so that I could customize what exactly gets inserted.

What do you think? Properties are used everywhere in .net code, this could be useful.

John H. Bergman
CTO
SiliconZone


[email protected]

To Send email, remove the .online.

support
Whole Tomato Software

5566 Posts

Posted - Jan 21 2004 :  2:28:14 PM  Show Profile
You might try a code template that uses %0. It can't do everything you want. Type and select Name before running the template.

Create string class using selection without m_Str:
private string m_str%0="+?";
public string %0
{
get
{
return this.m_str%0;
}
set
{
this.m_str%0=value;
}
}

Whole Tomato Software, Inc.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000