Taking Dynamo Scripts to Visual Studio is this possible?

This is probably a straight forward no but…

Is there a way to take your dynamo scripts extract its code and use within visual studio. I want to do this so i can add all scripts to a ribbon and learn the coding side of things instead of dragging lines to nodes.

Also scripts do run slow within the dynamo player (still faster than manual user input) but would like to make it even easier for colleagues to just press buttons on a ribbon also so they do not have access to the dynamo scripts to manipulate.

Any info would be create if this is a possible task to accomplish.