mo.notono.us

Tuesday, March 10, 2009

Visual Studio: A handful of useful Find and Replace Expressions

  • Find empty get; set; property declarations:
    \n:b*\{:b*\n:b*get;:b*\n:b*set;:b*\n:b*\}
  • Replace empty get; set; declarations with single line equivalent:
    { get; set; }
  • Find candidates for single line summary comments:
    /// \<summary\>\n:b+///:b*{[^\n]*}:b*\n:b+/// \</summary\>
  • Replace candidates with single line equivalent:
    /// \<summary\>\1\</summary\>
  • Find Class Diagram generated get:
    get\n:b+\{\n:b+throw new System.NotImplementedException\(\);\n:b+\}
  • Find Class Diagram generated empty set:
    set\n:b+\{\n:b+\}

Labels: , , , , ,

0 Comments:

Post a Comment

<< Home