locked
Can someone help with META DATA statement please :) [VB.NET] RRS feed

  • Question

  • User-398311785 posted

    Hi, I am a very young programmer in my co-op placement. We are currently rebuilding the company's existing employees only website. 

    I woud appreciate if someone can explain how MetaData type statements work and how to write one in my global.asax file. (or where its supposed to be with the new version of asp.net) 

    I have looked at various websites and I did not find them very helpful for my type of learning. 

    Thank you very much for your time :) 

    Wednesday, February 19, 2014 10:46 AM

Answers

  • User697462465 posted

    Hi TheMiniShaq,

    Metadata is the key to a simpler programming model, and eliminates the need for Interface Definition Language (IDL) files, header files, or any external method of component reference. Metadata enables .NET Framework languages to describe themselves automatically in a language-neutral manner, unseen by both the developer and the user. Additionally, metadata is extensible through the use of attributes. Metadata provides the following major benefits: 

    • Self-describing files.

      Common language runtime modules and assemblies are self-describing. A module's metadata contains everything needed to interact with another module. Metadata automatically provides the functionality of IDL in COM, so you can use one file for both definition and implementation. Runtime modules and assemblies do not even require registration with the operating system. As a result, the descriptions used by the runtime always reflect the actual code in your compiled file, which increases application reliability.

    • Language interoperability and easier component-based design.

      Metadata provides all the information required about compiled code for you to inherit a class from a PE file written in a different language. You can create an instance of any class written in any managed language (any language that targets the common language runtime) without worrying about explicit marshaling or using custom interoperability code.

    • Attributes.

      The .NET Framework lets you declare specific kinds of metadata, called attributes, in your compiled file. Attributes can be found throughout the .NET Framework and are used to control in more detail how your program behaves at run time. Additionally, you can emit your own custom metadata into .NET Framework files through user-defined custom attributes. For more information, see Extending Metadata Using Attributes.

    More information please refer to:
    http://msdn.microsoft.com/en-us/library/xcd8txaw(v=vs.110).aspx

    Hope it helps.

    Best Regards,
    Terry Guo

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 20, 2014 2:34 AM

All replies

  • User697462465 posted

    Hi TheMiniShaq,

    Metadata is the key to a simpler programming model, and eliminates the need for Interface Definition Language (IDL) files, header files, or any external method of component reference. Metadata enables .NET Framework languages to describe themselves automatically in a language-neutral manner, unseen by both the developer and the user. Additionally, metadata is extensible through the use of attributes. Metadata provides the following major benefits: 

    • Self-describing files.

      Common language runtime modules and assemblies are self-describing. A module's metadata contains everything needed to interact with another module. Metadata automatically provides the functionality of IDL in COM, so you can use one file for both definition and implementation. Runtime modules and assemblies do not even require registration with the operating system. As a result, the descriptions used by the runtime always reflect the actual code in your compiled file, which increases application reliability.

    • Language interoperability and easier component-based design.

      Metadata provides all the information required about compiled code for you to inherit a class from a PE file written in a different language. You can create an instance of any class written in any managed language (any language that targets the common language runtime) without worrying about explicit marshaling or using custom interoperability code.

    • Attributes.

      The .NET Framework lets you declare specific kinds of metadata, called attributes, in your compiled file. Attributes can be found throughout the .NET Framework and are used to control in more detail how your program behaves at run time. Additionally, you can emit your own custom metadata into .NET Framework files through user-defined custom attributes. For more information, see Extending Metadata Using Attributes.

    More information please refer to:
    http://msdn.microsoft.com/en-us/library/xcd8txaw(v=vs.110).aspx

    Hope it helps.

    Best Regards,
    Terry Guo

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 20, 2014 2:34 AM
  • User-398311785 posted

    Thank you very much for the detailed explaination! I very much appreciate this!! 

    Would you be able to answer this question of mine? 

    http://forums.asp.net/t/1969369.aspx?Please+Explain+what+is+wrong+with+this+

    Thanks once again! :)

    Thursday, February 20, 2014 8:59 AM