C# Helper Macros - Download version 0.2
This macro defines a set of C# helper commands to generate code from the
variable under cursor.
cs_generate_property (_str access=”public”)
cs_generate_argument_null_check
cs_generate_field_from_local
For a given class:
internal class Document
{
public Document (string file)
{
}
}
where the cursor is on “file” cs_generate_property() will generate excluding the comments:
internal class Document
{
private string _file; // cs_generate_field_from_local
public Document (string file)
{
if (file == null) // cs_generate_argument_null_check
throw new ArgumentNullException ("file");
_file = file;
}
public string File { // cs_generate_property
get { return _file; }
set { _file = value; }
}
Add New Comment
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Add New Comment