Monday, December 14, 2015

Class Widget: Create Methods From Property

Its feature is pretty self-explanatory, creating method(s) from a property of concern.

If something like the following is written anywhere in a class,

private string name; public string Name { get { return name; } set { name = value; } }

         the cursor is within the property body, and the Create Methods From Property command is called up, the following code will be created and maintained:

private string name;

public string GetName()
{
return name;
}
public void SetName(string value)
{
name = value;
}

The code compiles right away. Isn't it terrific?

Enjoy!

No comments:

Post a Comment