Rickard Nilsson

  • Blog
  • Archive
  • About
  • Contact

Welcome to rickardnilsson.net

Rickard Nilsson is a software architect, developer, craftsman, agile enthusiast, and father of three... More

Rickard blogs about crafting software using .NET tooling and solid, development practices.

Follow @rickardn

Top Posts

  • Applying stylesheets dynamically with jQuery
  • My customized Son of Obsidian Visual Studio color scheme for ReSharper
  • .NET Development with Visual Studio on MacBook Pro
  • Code Kata Cast
  • ReSharper User tip #2: Refactor rename namespace
  • Combining and minifying JavaScript and CSS files with Ajax Minifier
  • Dependency injection in ASP.NET MVC with Unity IoC Container
  • C# REPL and Interactive interpreter

Categories

  • .NET
  • Agile
  • ASP.NET 2.0
  • ASP.NET 3.5
  • ASP.NET 4
  • ASP.NET MVC
  • BlogEngine.NET
  • C# 2.0
  • C# 3.0
  • C# 4.0
  • Continuous Integration
  • CSS
  • Design by Contract
  • Design Patterns
  • iPhone
  • JavaScript
  • Kata
  • Moles
  • Open source
  • Personal
  • Review
  • Social media
  • Software development
  • TDD
  • Testing
  • Umbraco
  • Unit testing
  • Unity
  • User tip
  • Web development

Five most recent posts

  • How to unit test your database code when using ServiceStack OrmLite
  • Extract class - ReSharper Ninja tricks
  • ASP.NET MVC 3 Template with built in JavaScript and CSS merging and minification
  • ReSharper Ninja tricks - Generate code from usage
  • Unit testing continuously

Tag cloud

  • agile
  • blogengine.net
  • c#
  • code kata
  • codegarden11
  • continuous integration
  • css
  • dependency injection
  • fakes
  • iso 8601
  • javascript
  • jquery
  • refactoring
  • resharper
  • resharper usertip
  • tdd
  • testing
  • umbraco
  • unit test
  • unit testing
  • visual studio

Recent comments

<< Building a Photo Album widget for BlogEngine.NET | TDD Masterclass in the UK with Roy Osherove >>

ReSharper User tip #2: Refactor rename namespace

Tuesday, 26 August 2008 10:30 by Rickard Nilsson

Update! You can now find more user tips with the ReSharper user tip tag.

Have you ever wanted to rename a namespace but you have too many classes in the namespace that it would be an infeasible hassle changing all of them individually. Even using a tool like ReSharper to refactor the namespaces class by class is a hassle. Here is how to rename a namespace for all of its classes in a couple of key strokes using ReSharper.

Example

Mechanics

  1. Open Class View (Ctrl + Shift + C)
  2. Choose the namespace you want to rename
  3. Press Ctrl + R, R*
    or right-click on the namespace an choose Refactor > Rename
  4. Pick another name
  5. Hit Next

Update! Alternate context menu option to rename namespaces. Tested with ReSharper 5.1.

rsharper_rename_namespace

and you're done!

Please leave a comment if you found this useful.

* Visual Studio scheme

Tags:   resharper, refactoring, resharper usertip
Categories:   .NET | User tip | Software development
Actions:  

Related posts

ReSharper User tip: Refactor magical strings to variable Update! You can now find more user tips with the ReSharper user tip tag. I've been using Jetbrains ...Extract class - ReSharper Ninja tricksThis is part of a series of ReSharper Ninja ticks and workflows which I’ve picked up over the years....ReSharper Ninja tricks - Generate code from usageFollowing test-driven development I often define my unwritten classes by first using it in a unit te...
Comments are closed
 
Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© 2008-2011 rickardnilsson.net
Creative Commons-licens