Press the Ctrl + . or Ctrl + ~ shortcut to invoke the Code Actions menu. Select Rename Namespace to Match Folder Structure from the menu.
There is no easy way to change namespace in Kubernetes using kubectl command line utility. But here are some commands that you can alias in your bashrc file so that it's just a single command that you can use to change the namespace in the Kubernetes cluster.
Just right click on the name you want to change (this could be namespace or whatever else) and select Refactor->Rename... Enter new name, leave location as [Global Namespace], check preview if you want and you're done!
You could put the caret on a namespace declaration in your C# code and press F2 on the keyboard. This should let you change the name of the namespace across the entire project, including the XAML files.
using namespace new::nested;
Example at Ideone.
Or if you actually want a real alias:
namespace on = one::nested;
Example at Ideone.
This:
namespace old = newns::nested;
would seem to be what you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With