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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:31:05+00:00 2026-06-16T03:31:05+00:00

This question is for the .NET Framework 4 Is anyone aware of a way

  • 0

This question is for the .NET Framework 4

Is anyone aware of a way to force the compiler to generate an error when a given instance method makes any calls that block the thread. I am working in a body of code and would like a mechanical way to make sure that nothing in the execution chain will block the thread.

I have been trying to find a property I can add to a method declaration but have not been able to find anything.

When I use the word block I didn’t mean just any code that may hang. Specifically some of the Microsoft api calls like SMTP.Send() and NetworkStream.Read() will stop execution until a specific event is reached.

  • 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-16T03:31:06+00:00Added an answer on June 16, 2026 at 3:31 am

    use FxCop SDK to write your own code analysis rule , set the message level to Error so that whenever the rule is violated it will show up as “compile error” , take a look at this blog for more information Custom Code Analysis Rules

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

Sidebar

Related Questions

I'm reviving this question, and making it more specific: Is there a .NET framework
This question most closely relates to the asp.net mvc3 framework. It started out as
This question ( .net Compact Framework 4.0 ) asked this back before the release
Quick Question: Anyone knows this? : http://lwis.net/free-css-drop-down-menu/ It uses javascript for -IE6 only, but
I asked this question: Is ASP.NET MVC destined to replace Webforms? and a few
This question is about the public key that every .NET assembly has AFAIK (looking
This question is similar to this: Asp.net Profile Across Sub-Domain I'm basically wondering if
This question is related to my ASP.NET MVC 2 development, but it could apply
This question is a bit of a two parter for .Net data services. This
This is a continuation of my previous question .NET regex engine returns no matches

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.