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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:04:20+00:00 2026-05-16T12:04:20+00:00

The ECMA Common Language Infrastructure documentation says this about the CIL isinst class instruction:

  • 0

The ECMA Common Language Infrastructure documentation says this about the CIL “isinst class” instruction:

Correct CIL ensures that class is a valid typeref or typedef or typespec token indicating a class, and
that obj is always either null or an object reference.

This implies that a valuetype is not allowed, right? But mscorlib.dll contains a method System.RuntimeTypeHandle::Equals(object obj) with the following instruction:

IL_0001: isinst System.RuntimeTypeHandle

And System.RuntimeTypeHandle is a valuetype. Can anybody put me right here?

  • 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-16T12:04:21+00:00Added an answer on May 16, 2026 at 12:04 pm

    Have a look at the declaration of RuntimeTypeHandle:

    .class public sequential ansi serializable sealed beforefieldinit RuntimeTypeHandle
        extends     System.ValueType
        implements  System.Runtime.Serialization.ISerializable
    

    Although RuntimeTypeHandle is declared as a struct its representation in CIL is some kind of special class. In other words, you can imagine structs as special classes that inherit from System.ValueType and whose attributes follow a strict order.

    With that in mind isinst would be callable with RuntimeTypeHandle. For what I interpret isinst is not limited to reference types at all as long as there is a class representing the type.

    Let’s say we write in C#:

    var i = 4;
    var b = i is Int32;
    

    We get a compiler warning

    Warning: The given expression is always of the provided (‘int’) type.

    What happens? We assign 4 to i. ibecoms an int. On the next line iis being auto-boxed to its corresponding ReferenceType (class), so that the warning is obvious. We could even write

    var b = i is int;
    

    I hope this can contribute to some kind of clearification on this topic.

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

Sidebar

Related Questions

Created by Microsoft as the foundation of its .NET technology, the Common Language Infrastructure
The ECMA standard for the .NET Common Intermediate Language has been updated three times.
Do you know a JavaScript library that implements a generic Iterator class for collections
I just want the ECMA language translated into native code with the fundamental runtime
I know that the ECMA Script specification does not specify which algorithm to use
I'm already aware of some browser-specific DOM documentation out there (Gecko DOM Reference for
The ECMA standard defines a hidden, internal property [[Call]] , which, if implemented, mean
Is WPF an ECMA standard library? Or it is just a part of MS
As per http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf , JavaScript has 6 types: undefined , null , boolean ,
Since File API will enable access to the content of local files it is

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.