I just recently realized that Visual Studio offers the ability to split the code view into 2 sections (top and bottom). Now, having played with it a bit, if you make changes in one, it affects the other. My question is, what is the purpose of this? How do people use it?
In case you're unaware of this, one way of splitting the code view is by moving this slider circled in the picture:

Code Review
I occasionally use it to view a method that is called from another method during a code review. For instance, if I am code reviewing method A, and it calls B, and I want to see A and B at the same time, I will pull that down, and scroll one to B, and leave the other at A.
private void A()
{
// code here
B();
}
// other methods here that push B out of the viewable area.
private void B()
{
// code here
}
Pro Tip
Another way to flip back and forth with just the keyboard, although you wouldn't see both methods at the same time, is to hit F12 on the call to B within A, which is a shortcut to "Go To Definition", and then hitting Ctrl+-, which is a shortcut for "Navigate Backwards", which brings you back to where your cursor was previously. I frequently use Ctrl + Shift + - to navigate forwards, and Ctrl + - to navigate backwards.
Trivia
This extra viewing pane isn't exclusive to Visual Studio. You will notice Sql Server Management Studio, MS Word, and MS Outlook have the same functionality. I presume many other apps do too.
Viewing Multiple Functions, Classes, or anything can be viewed.. whenever you want to see multiple things at a time, this split view can be useful.
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