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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:32:15+00:00 2026-05-27T22:32:15+00:00

When, if ever, is it safe to wrap behind a conditional code that requires

  • 0

When, if ever, is it safe to wrap behind a conditional code that requires an assembly that may not be present?

For example:

if (SafeCheckForOptionalAssembly()) {
    // Code requiring an optional assembly
} else {
    // fallback: don't rely on optional assembly
}

Directly related questions:

  1. Does it matter if the conditionally included code uses a type contained within the optional assembly? (e.g. var foo = new MyClassInOptionalAssembly())
  2. Does the behavior change if the conditionally included code is wrapped in a method?
  • 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-27T22:32:15+00:00Added an answer on May 27, 2026 at 10:32 pm
    1. Yes, doesn’t work. The jitter will bomb trying to compile the method before it starts running. The exception is raised in the calling method.

    2. Possibly. But to be 100% sure, you’ll need to apply the [MethodImpl(MethodImplOptions.NoInlining)] attribute so the method never gets inlined.

    These assumptions are only valid for a jitter that compiles on demand. The Microsoft x86 and x64 jitters do. The Mono jitter doesn’t (last I looked).

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

Sidebar

Related Questions

Ever stumbled on a tutorial that you feel is of great value but not
My code mkdir(/some/absolute/path,0777); and mkdir(relative/path, 0777); is not working, safe mode is turned off,
Will the facebookId ever change? If not, Is it safe to use it in
I know that it's not safe to throw exceptions from destructors, but is it
I'm using code that treats an array of derived objects as an array of
I have code that relies heavily on email notification. In my web.config I am
I'm looking at some code that has a call to findViewById without assigning the
My problem is that memcache logic inside my cakePHP application is not working on
While doing normal day-to-day Android development, is it safe to assume that hook methods
Ever since I started using .NET, I've just been creating Helper classes or Partial

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.