Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6888127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:58:16+00:00 2026-05-27T05:58:16+00:00

I am working in MonoTouch and very new to it. I’ve been playing built

  • 0

I am working in MonoTouch and very new to it. I’ve been playing built an app for Windows Phone and I’d like to port it to iOS. Because my app is in Silverlight, that is kind of my point of reference.

  1. In Silverlight, there is a Application_UnhandledException event. This global event handler empowers someone to handle any error that hasn’t been caught else where in an application. Is there something similar in MonoTouch?
  2. How should someone create application-wide variables? In Silverlight, I would use App.VariableName. However, I’m not sure if this recommended in MonoTouch.

Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:58:17+00:00Added an answer on May 27, 2026 at 5:58 am

    You can handle unhandled exceptions with this:

    AppDomain.CurrentDomain.UnhandledException += delegate(object sender, UnhandledExceptionEventArgs e) {
                    this.doSomething(((Exception)e.ExceptionObject));
    };
    

    Or Application-wide variables, what I usually do is I create a class with the name of my app, which my variables in it, and then I create a sharedInstance object that I use, so I can do something like:

    MyApp.sharedInstance.LoggedInUser = new User();
    

    There’s no specific place in the framework for you to put your variables, although some people use the AppDelegate class for it (which seems to be common between iOS obj-c developers). I just prefer to keep it totally separate from UIKit/iOS, so it’s reusable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Since updating a working MonoTouch 3.x app to MonoTouch 4.0, I have been getting
I'm working on an iPad app in Monotouch (5.2.12). The app will be used
I have a very, very weird effect here using Monotouch 5.2.5 running my app
I have not been working with Monotouch (or the iphone for that matter) for
I am working on an iOS word game which is built around pulling random
I have a third party library which I finally have working within my MonoTouch
Working with developer phone earlier, today i tried my hand on emulator i do
Working with MonoTouch .NET for iPhone and SQLite on Mac OSX. I can read
I'm working on a way to get MonoTouch projects to build in Visual Studio
I am working on providing PhoneGap functionality in a UIWebView in MonoTouch. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.