When creating a Windows Phone application that will be submitted and hopefully published in the Marketplace, is always a good idea to have an "About" page where users can find information about the application, the author and even support contact information. When doing this, you should always include the application version number, so you know which version of your application the user has. This will save you a lot of time when trying to solve issues or when trying to replicate certain behaviours.
Here is how you retrieve the application's assembly version number:
The code assumes you are running the method on the MainPage.xaml.cs and that's why it uses its type when retrieving the current assembly. If you were running this on the about page (called AboutPage.xaml) then you should use that as the type to get the assembly. When calling ToString() on the assembly returned, you will get the assembly properties (you can modify this on the project's assembly properties):
TestApp, Version=184.108.40.206, Culture=neutral, PublicKeyToken=null
Remember that the assembly number is not related to the Marketplace application version number, but it is a good idea to keep both in sync, so make sure to review/update the assembly version number when you are publishing your app and choosing the version number for the Marketplace in the App Hub portal.