none
C# Assemblies in the Common Language Runtime RRS feed

  • Question

  • Hi C# experts,

    According to MSDN http://msdn.microsoft.com/en-us/library/k3677y81.aspx

    Assemblies in the Common Language Runtime

    .NET Framework 4.5

    Assemblies are the building blocks of .NET Framework applications; they form the fundamental unit of deployment, version control, reuse, activation scoping, and security permissions. An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality.

    What do you mean by resources, the data members of the types or what?

    Thanks.

    Tuesday, September 11, 2012 7:09 PM

Answers

  • What do you mean by resources, the data members of the types or what?

    Resources are static data compiled into the assembly by the toolchain.  For .NET code, resources appear in .resx files and can contain any data you wish, but resources are typically used by GUI framework like Windows Forms to contain static data for the UI, for example: images to be used by a series of toolbar buttons.

    There are also Win32 resources, which are also static data but are used for very different purposes - mostly for interaction with the operating system.  For example, the version resource that Explorer displays when you examine properties of an executable file is a Win32 resource.  Win32 resources are typically defined in .rc files which are compiled by the resource compiler (rc.exe) into .res files.

    Most .NET programmers will rarely deal with resources directly - where they're needed, the designers (e.g. WinForms) will create them and the C# project system will do the right thing to include the compiled resources in the final assembly.


    -cd Mark the best replies as answers!


    Tuesday, September 11, 2012 9:38 PM
    Moderator
  • Resources - you can say - any noncode component is a esource. For example, images, text files, Resx files or anything that your assembly should contain along with source code.


    Please mark this post as answer if it solved your problem. Happy Programming!

    Wednesday, September 12, 2012 2:51 AM

All replies

  • Type are Class in th elibrary and resourse are the windows operating system.  The windows functionality is obtained by use dll's in the system32 folder.

    jdweng

    Tuesday, September 11, 2012 8:53 PM
  • What do you mean by resources, the data members of the types or what?

    Resources are static data compiled into the assembly by the toolchain.  For .NET code, resources appear in .resx files and can contain any data you wish, but resources are typically used by GUI framework like Windows Forms to contain static data for the UI, for example: images to be used by a series of toolbar buttons.

    There are also Win32 resources, which are also static data but are used for very different purposes - mostly for interaction with the operating system.  For example, the version resource that Explorer displays when you examine properties of an executable file is a Win32 resource.  Win32 resources are typically defined in .rc files which are compiled by the resource compiler (rc.exe) into .res files.

    Most .NET programmers will rarely deal with resources directly - where they're needed, the designers (e.g. WinForms) will create them and the C# project system will do the right thing to include the compiled resources in the final assembly.


    -cd Mark the best replies as answers!


    Tuesday, September 11, 2012 9:38 PM
    Moderator
  • Resources - you can say - any noncode component is a esource. For example, images, text files, Resx files or anything that your assembly should contain along with source code.


    Please mark this post as answer if it solved your problem. Happy Programming!

    Wednesday, September 12, 2012 2:51 AM