You cant use C# on the CME as it is a Browser GUI
However you can use JavaScript and Anguilla framework to get the Webdav URL. It's not a very user friendly process, but anyway the Webdav URL is not meant to be used by editors anyway.
To accomplish this use the Browser debugger console or Firebug console and execute the following commands. Make Sure your are inside the Dashboard.aspx (specially after SDL Tridion 2013) and execute the following commands
myTemplate = $tcm.getItem("YOUR_TEMPLATE_URI")
myTemplate.loadWebDavUrl()
myTemplate.getWebDavUrl()
This will be the results on your debug console: