FACTOID # 97: Got a parking ticket in Finland? Better just pay up - it is the least corrupt nation in the world.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

FACTS & STATISTICS    Simple view

  1. Select countries to view: (hold down Control key and click to select several)

     

     

    Compare:

     

     

  1. Select fact or statistic: (* = graphable)

     

     

     

  2. (OPTIONAL) Compare to statistic: (both need to be graphable)

     

     

     

  3. View result as:

     

       
(OR) SEARCH ALL encyclopedia, stats & forums:   

Encyclopedia > .NET metadata

.NET metadata, in the Microsoft .NET framework, refers to code that describes .NET CIL (Common Intermediate Language) code. A .NET language compiler will generate the metadata and store this in the assembly containing the CIL. Metadata describes all classes and class members that are defined in the assembly, and the classes and class members that the current assembly will call from another assembly. The metadata for a method contains the complete description of the method, including the class (and the assembly that contains the class), the return type and all of the method parameters. When the CLR executes CIL it will check to make sure that the metadata of the called method is the same as the metadata that is stored in the calling method. This ensures that a method can only be called with exactly the right number of parameters and exactly the right parameter types. Microsoft . ... Common Intermediate Language (CIL) (formerly called Microsoft Intermediate Language or MSIL) is the lowest-level human-readable programming language in the Common Language Infrastructure and in the . ... This article is about the computing term. ... Metadata (Greek meta after and Latin data information) are data that describe other data. ... . ... In object-oriented programming, classes are used to group related variables and functions. ... Return types are what results from calling a method or function in high-level programming languages, such as Java, C++, C, Prolog and many others. ... Used mainly in object-oriented programming, the term method refers to a piece of code that is exclusively associated either with a class (called class methods, static methods, or factory methods) or with an object (called instance methods). ... A parameter is a variable which can be accepted by a subroutine. ... The Common Language Runtime (CLR) is the virtual machine component of Microsofts . ...


Attributes

Developers can add metadata to their code through attributes. There are two types of attributes, custom and pseudo custom attributes, and to the developer these have the same syntax. Attributes in code are messages to the compiler to generate metadata. A pseudo custom attribute is metadata that the CLR knows about, for example [Serializable] (which means that an instance of the class can be serialized). The 'pseudo' in pseudo custom attribute refers to the fact that the compiler will not use it to generate custom metadata; instead, it will generate metadata that the CLR knows about. Example (C#): For other uses, see Syntax (disambiguation). ... In computer science, in the context of data storage and transmission in programming languages like Java, serialization is the process of saving an object onto a storage medium (such as a file, or a memory buffer) or to transmit it across a network connection link, either as a series of... The title given to this article is incorrect due to technical limitations. ...

 [Serializable] public class MyClass { ... } 

When the compiler sees a custom attribute it will generate custom metadata that is not recognised by the CLR. The developer has to provide code to read the metadata and act on it. For example, the Visual Studio property grid groups together properties of an object that is being viewed using categories; the class developer indicates the category for the object's class by applying the [Category] custom attribute. In this case it is application code — the property grid — that interprets the attribute, not the CLR. Microsoft Visual Studio is a series of IDEs by Microsoft. ... In information processing, properties are transmitted by objects and received by observers. ...


How metadata is stored

Assemblies contain tables of metadata. These tables are described by the CIL specification. The metadata tables will have zero or more entries and the position of an entry determines its index. When CIL code uses metadata it does so through a metadata token. This is a 32-bit value where the top 8 bits identify the appropriate metadata table, and the remaining 24 bits give the index of the metadata in the table. The Framework SDK contains a sample called metainfo that will list the metadata tables in an assembly, however, this information is rarely of use to a developer. This article is about the unit of information. ... A Software Development Kit, or SDK for short, is typically a set of development tools that allows a software engineer to create applications for a certain software package, software framework, hardware platform, computer system, operating system or similar. ...


Metadata in an assembly may be viewed using the ILDASM tool provided by the .NET Framework SDK.


Reflection

Reflection is the API used to read .NET metadata. The reflection API provides a logical view of metadata rather than the literal view provided by tools like metainfo. Reflection in version 1.1 of the .NET framework will allow you to inspect the descriptions of classes and their members, and it will allow you to execute code. However, version 1.1 will not allow you to get access to the CIL for a method. Version 2.0 of the framework will allow you to obtain the CIL for a method. In computer science, reflection is the process by which a computer program of the appropriate type can be modified in the process of being executed, in a manner that depends on abstract features of its code and its runtime behavior. ... API may refer to: In computing, application programming interface In petroleum industry, American Petroleum Institute In education, Academic Performance Index This page concerning a three-letter acronym or abbreviation is a disambiguation page — a navigational aid which lists other pages that might otherwise share the same title. ...


Besides the System.Reflection namespace, the following tools are available for reading .NET metadata and parsing IL:

  • PostSharp
  • Mono Cecil


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.