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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:50:38+00:00 2026-06-06T21:50:38+00:00

In a Visual Studio 2010 C# Project, how do I find out if any

  • 0

In a Visual Studio 2010 C# Project, how do I find out if any method is written without having a try-catch block?

Sometimes as a code reviewer, its hard to search function/methods which are not properly written according to code standards esp: without a try-catch block.

I know that the Find option in Visual Studio supports regular expressions. But what’s the regular expression that could perform this job smartly?

  • 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-06-06T21:50:40+00:00Added an answer on June 6, 2026 at 9:50 pm

    Edit (putting the direct answer first): It would actually be easy to use Assembly.ReflectionOnlyLoadFrom, then enumerate the types, and the methods of those types, then for each method body examine the ExceptionHandlingClauses.

    Commentary follows:

    Red Gate used to offer the Exception Hunter tool for tracking down possible exception issues. As mentioned on that page, it’s been shown that the specific task you have requested (broad searches for any unhandled exception) does not lead to higher quality software even with assistance of automated analysis tools.

    If I needed to find a list of all methods without a protected region, I could simply use one of my experimental assembly loaders (written with relative ease according to ECMA-335) and examine the metadata as described in ECMA-335, Partition II, §25.4.5 and §25.4.6 (much easier to use the first part of this answer). If I needed to find a list of these methods for the purpose of adding a protected region to each of them to conform to a coding standard, I would report back that they need to find another developer to do that because I refuse to knowingly and intentionally degrade the quality of software I work on.

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

Sidebar

Related Questions

When debugging a C++ Project using Visual Studio 2010, it cannot find the source
I am using Visual Studio 2010 Ultimate. I want to find out which methods
I have tried to find all Validators in our project in Visual Studio 2010.
In my Visual Studio 2010 project I have files with .mm file extension, that
I've got a visual studio 2010 project which publishes an assembly called myAssembly.ddl .
I have a Visual Studio 2010 C# project which creates an .exe and this
I've got a Visual Studio 2010 C++ project. Previously everything was working fine but
When I add a service reference to my Visual Studio 2010 C# project, a
I have a C# application, and a Visual Studio (2010) Setup Project with it.
In Visual Studio 2010 I have an ASP.NET MVC 3 project called blahblah. As

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.