iPhone MonoTouch - Get Version of Bundle

2019-03-23 04:23发布

问题:

In MonoTouch, how can we get the version of the bundle currently running?

My closest guess is somewhere in :

NSBundle.MainBundle.ObjectForInfoDictionary

回答1:

Use the following code to get the current version of the bundle:

NSBundle.MainBundle.ObjectForInfoDictionary("CFBundleVersion").ToString();