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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T15:13:47+00:00 2026-05-14T15:13:47+00:00

I think I might be missing something important, but I can’t seem to figure

  • 0

I think I might be missing something important, but I can’t seem to figure out how to construct a conditional statement in IL with dynamic method. I’ve only dabbled lightly in it before, but I need to extend some code now.

Is there some documentation somewhere that I haven’t found (apart from the CLI documentation), or does someone have some sample code? That would be fantastic.

Cheers,

  • 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-14T15:13:47+00:00Added an answer on May 14, 2026 at 3:13 pm

    Depending on your exact code, the various branch instructions are your friend.

    Here is

    if(memory[pointer] > 0) goto IL_0002;
    

    in IL:

    IL_001f:  ldsfld     uint8[] BFHelloWorldCSharp.Program::memory
    IL_0024:  ldsfld     int16 BFHelloWorldCSharp.Program::pointer
    IL_0029:  ldelem.u1
    IL_002a:  ldc.i4.0
    IL_002b:  bgt      IL_0002
    

    You basically push the values you want to compare onto the stack and then call bgt to jump where you need to.

    You can check the OpCodes Class for a quick overview of IL Commands, for example brtrue/brfalse or beq.

    I would also recommend writing the if command in C#, compiling it, and using ILDASM or Reflector to look at the generated IL.

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

Sidebar

Related Questions

I think I might be missing something, but I can't see how to use
It might be very simple but I think I am missing something. I have
I might be missing something, but I'm getting what I think seems an odd
this is somewhat tricky to figure out I think, perhaps I am missing something.
I think I'm missing something simple, but I'm just not seeing it. I have
I think I might be missing the point of having a logging framework for
I think it might have been asked before but i was unable to find
I think I might have done something right, headByRating and headByName both refer to
I think I might be overtired but I cannot for the life of me
I think I might be having a stack overflow problem or something similar in

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.