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 7277981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T22:48:49+00:00 2026-05-28T22:48:49+00:00

Somehow today when I input: try {} catch {} I get this: try {

  • 0

Somehow today when I input:

try {} catch {}

I get this:

try 
{       
}
catch (global::System.Exception ex)
{
}

But it should be just:

try 
{       
}
catch (Exception ex)
{
}

What happens? How I can back to Exception?

  • 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-28T22:48:49+00:00Added an answer on May 28, 2026 at 10:48 pm

    The following progam results in global::System.Exception if you place the cursor between the braces for the Main method and type try and press [TAB] twice, i.e. triggering the code snippet for a try/catch.

    Therefore – do you have a class called Exception defined somewhere in your project / referenced assemblies, or do you define a top-level namespace System? One of these, or a combination could cause this. Also note that the code sample lists no using statements so that could be a contributing factor.

    namespace ExceptioWuh
    {
        class Program
        {
            static void Main(string[] args)
            {
    
            }
        }
    
        namespace System
        {
            class Exception : global::System.Exception
            {
            }
        }
    }
    

    Not having the custom type called Exception present results in the catch being catch (System.Exception) so I think it’s quite a specific scenario that causes this.

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

Sidebar

Related Questions

Somehow, using linq I can't test it with this CUF field in the beginning:
somehow couldn't find this with a google search, but I feel like it has
Somehow I never noticed until today that C++ supports nested classes. This surprised me
I was just trying out this new app I downloaded today and that usual
can I code this condition in ruby somehow? I need to know if a
somehow I get never any results when I call: select * from table_1 t1
Today I've tried to get Edit & Continue to work in my solution, which
This is a knowledge topic based on an earlier question I had today. These
Somehow i came across a bug today and i was trying to replicate it.
Today, during some other somehow related work, came across my mind the following question:

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.