In monodroid when you have a attribute that want its value be uniqe in all times when your application is run you can use Application class like this:
namespace RPLAndroidApp
{
[Application(Label=”TestApp”,Icon=”@drawable/icon”)]
public class TestApp :Application
{
private int_tempV;
public object tempV {
get;
set;
}
public bool OfflineMode{
get;
set;
}
public override void OnCreate ()
{
try {
base.OnCreate ();
} catch (Exception ex) {
Common .HandleException (ex);
}
}
And i use this in my application like this:
((TestAPP)Application).tempV
Now, the question is this. How can we can use this mechanism in Monotouch for iPhone development?
You can use UIApplicationDelegate for this purpose.
But I don’t think that this is a good idea. Of course without the knowledge of the problem I can not say for sure, but it maybe you need to create a simple Singleton class for holding you attributes values?