c# - WP8 Get application info -
I am developing an application that requires information from my applications (not only this app) Specifically, I need the app's name and version. How can you do this?
You can use the list of applications and their information to get on WP8.
public static in main (string [] args) {PackageManager packageManager = new PackageManager (); IEnumerable & LT; Windows.ApplicationModel.Package & gt; Package = (IEnumerable & lt; Windows.ApplicationModel.Package & gt;) packageManager.FindPackages (); Int packagecount = 0; Foreign currency (package in package) {DisplayPackageInfo (package); PackageCount + = 1; } If (PackageCount & lt; 1) {Console.WriteLine ("No package was found."); }} Private Static Zero DisplayPackageInfo (Windows.ApplicationModel.Package Package) {Console.WriteLine ("name: {0}", package.Id.Name); Console.print line ("full name: {0}", package. id.full_name); Console.lightline ("version: {0}. {1}. {2}. {3}", package.id.varsian.marger, package.edd.version.mineor, package.edd.version.bild, package. Id.Version.Revision); Console.lightline ("publisher: {0}", package.id.publisher); Console.lightline ("Publisher ID: {0}", package.id. PublisherId); Console.light line ("Installed location: {0}", package. Installed location path); Console.light line ("iffeworkwork: {0}", package .sf framework); }
Comments
Post a Comment