In what type project you want to access as in window based or web Based.
In window based project you will provide it as public and you can use it by using object of page
pageobject.TextBox.ToString();