I want to get current page url in my razor code.how to retrieve that?
The Razor Mediator has excellent documentation, including the info you're looking for: https://code.google.com/p/razor-mediator-4-tridion/downloads/detail?name=RazorMediatorDocumentation_v1.3.3.docx
In your case I think you'll want to use the @Publication.PublicationUrl to get the URL then concatenate the @Page.FileName onto the end of it.
Where and when is your code being executed? By the web application when a user makes a request or by the publisher service when an editor publishes the page?
Tridion templates or template building blocks are not executed when visitors make requests; as such there is no way to determine the URL of the request within the web application from a template simply because the template isn't executed inside the web application.
If you want to determine the requested URL by the visitor you need to write code that is executed by the web application at request time. You can emit this code from your razor template (as opposed to execute it). This will cause the published page to contain the code. Every time the published page is requested the code will be executed.