What you are referring to is REPL (Read Evaluate Print Loop) AKA 'interactive'.
Currently, scriptcs provides it's own REPL on the command line. I.e. if you start scriptcs.exe providing no arguments you will start the REPL and you can interact with it exactly as you describe.
In VS, there is an interactive window but it doesn't function in the same way, nor support the same features, as the scriptcs REPL. We are currently actively working with Microsoft to align the experience of the VS interactive window the scriptcs REPL with but there are not timelines for delivery yet.