how to change namespace in visual studio 2019 code example
Example 1: visual studio rename namespace
How-to
Place your cursor in the namespace name.
Press Ctrl+. to trigger the Quick Actions and Refactorings menu.
Select Change namespace to <folder name>.
See also
Example 2: how to manage namespaces in visual studio
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!
write MyName in Assembly name and Default namespace textbox, then save