Click here to Skip to main content
15,892,965 members
Articles / Programming Languages / C#

Quiz - C# and .NET Secrets

Rate me:
Please Sign up or sign in to vote.
4.70/5 (35 votes)
1 Feb 2008CPOL8 min read 120K   2.4K   64  
You are a .NET professional? C# is your native language? Try to answer these questions and prove it! We have assembled a set of questions around C#, the CLR and Intermediate Language. Even if you are not perfectly familiar with those topics give it a try!
//  Microsoft (R) .NET Framework IL Disassembler.  Version 2.0.50727.42
//  Copyright (c) Microsoft Corporation.  All rights reserved.



// Metadata version: v2.0.50727
.assembly extern mscorlib
{
  .publickeytoken = (B7 7A 5C 56 19 34 E0 89 )                         // .z\V.4..
  .ver 2:0:0:0
}
.assembly ValueVsReferenceTypes
{
  .custom instance void [mscorlib]System.Reflection.AssemblyCopyrightAttribute::.ctor(string) = ( 01 00 00 00 00 ) 
  .custom instance void [mscorlib]System.Reflection.AssemblyTitleAttribute::.ctor(string) = ( 01 00 15 56 61 6C 75 65 56 73 52 65 66 65 72 65   // ...ValueVsRefere
                                                                                              6E 63 65 54 79 70 65 73 00 00 )                   // nceTypes..
  .custom instance void [mscorlib]System.Reflection.AssemblyDescriptionAttribute::.ctor(string) = ( 01 00 2C 57 68 61 74 20 69 73 20 74 68 65 20 6F   // ..,What is the o
                                                                                                    75 74 70 75 74 20 6F 66 20 74 68 65 20 66 6F 6C   // utput of the fol
                                                                                                    6C 6F 77 69 6E 67 20 70 72 6F 67 72 61 6D 3F 00   // lowing program?.
                                                                                                    00 ) 
  .custom instance void [mscorlib]System.Reflection.AssemblyConfigurationAttribute::.ctor(string) = ( 01 00 00 00 00 ) 
  .custom instance void [mscorlib]System.Reflection.AssemblyCompanyAttribute::.ctor(string) = ( 01 00 16 73 6F 66 74 77 61 72 65 20 61 72 63 68   // ...software arch
                                                                                                69 74 65 63 74 73 20 6F 67 00 00 )                // itects og..
  .custom instance void [mscorlib]System.Reflection.AssemblyProductAttribute::.ctor(string) = ( 01 00 1A 51 75 69 7A 20 2D 20 43 23 20 61 6E 64   // ...Quiz - C# and
                                                                                                20 2E 4E 45 54 20 53 65 63 72 65 74 73 00 00 )    //  .NET Secrets..
  .custom instance void [mscorlib]System.Runtime.InteropServices.GuidAttribute::.ctor(string) = ( 01 00 24 63 63 39 61 32 37 32 38 2D 66 61 65 38   // ..$cc9a2728-fae8
                                                                                                  2D 34 65 62 30 2D 39 37 39 64 2D 66 65 32 37 35   // -4eb0-979d-fe275
                                                                                                  31 38 32 64 35 64 31 00 00 )                      // 182d5d1..
  .custom instance void [mscorlib]System.Reflection.AssemblyTrademarkAttribute::.ctor(string) = ( 01 00 00 00 00 ) 
  .custom instance void [mscorlib]System.Runtime.InteropServices.ComVisibleAttribute::.ctor(bool) = ( 01 00 00 00 00 ) 

  // --- The following custom attribute is added automatically, do not uncomment -------
  //  .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) 

  .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78   // ....T..WrapNonEx
                                                                                                             63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 )       // ceptionThrows.
  .custom instance void [mscorlib]System.Reflection.AssemblyFileVersionAttribute::.ctor(string) = ( 01 00 07 31 2E 30 2E 30 2E 30 00 00 )             // ...1.0.0.0..
  .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) 
  .hash algorithm 0x00008004
  .ver 1:0:0:0
}
.module ValueVsReferenceTypes.exe
// MVID: {BBD579E9-E0EB-4343-80D6-C96C5B27569F}
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003       // WINDOWS_CUI
.corflags 0x00000001    //  ILONLY
// Image base: 0x008B0000


// =============== CLASS MEMBERS DECLARATION ===================

.class private auto ansi beforefieldinit ValueVsReferenceTypes.Program
       extends [mscorlib]System.Object
{
  .method private hidebysig static void  Main() cil managed
  {
    .entrypoint
    // Code size       57 (0x39)
    .maxstack  3
    .locals init ([0] string stringValue,
             [1] string stringValue2,
             [2] int32[] 'array',
             [3] int32[] array2)
    IL_0000:  nop
    IL_0001:  ldstr      "Hello World!"
    IL_0006:  stloc.0
    IL_0007:  ldloc.0
    IL_0008:  stloc.1
    IL_0009:  ldstr      "Hello Austria!"
    IL_000e:  stloc.0
    IL_000f:  ldloc.1
    IL_0010:  call       void [mscorlib]System.Console::WriteLine(string)
    IL_0015:  nop
    IL_0016:  ldc.i4.4
    IL_0017:  newarr     [mscorlib]System.Int32
    IL_001c:  dup
    IL_001d:  ldtoken    field valuetype '<PrivateImplementationDetails>{BBD579E9-E0EB-4343-80D6-C96C5B27569F}'/'__StaticArrayInitTypeSize=16' '<PrivateImplementationDetails>{BBD579E9-E0EB-4343-80D6-C96C5B27569F}'::'$$method0x6000001-1'
    IL_0022:  call       void [mscorlib]System.Runtime.CompilerServices.RuntimeHelpers::InitializeArray(class [mscorlib]System.Array,
                                                                                                        valuetype [mscorlib]System.RuntimeFieldHandle)
    IL_0027:  stloc.2
    IL_0028:  ldloc.2
    IL_0029:  stloc.3
    IL_002a:  ldloc.2
    IL_002b:  ldc.i4.0
    IL_002c:  ldc.i4.s   99
    IL_002e:  stelem.i4
    IL_002f:  ldloc.3
    IL_0030:  ldc.i4.0
    IL_0031:  ldelem.i4
    IL_0032:  call       void [mscorlib]System.Console::WriteLine(int32)
    IL_0037:  nop
    IL_0038:  ret
  } // end of method Program::Main

  .method public hidebysig specialname rtspecialname 
          instance void  .ctor() cil managed
  {
    // Code size       7 (0x7)
    .maxstack  8
    IL_0000:  ldarg.0
    IL_0001:  call       instance void [mscorlib]System.Object::.ctor()
    IL_0006:  ret
  } // end of method Program::.ctor

} // end of class ValueVsReferenceTypes.Program

.class private auto ansi '<PrivateImplementationDetails>{BBD579E9-E0EB-4343-80D6-C96C5B27569F}'
       extends [mscorlib]System.Object
{
  .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
  .class explicit ansi sealed nested private '__StaticArrayInitTypeSize=16'
         extends [mscorlib]System.ValueType
  {
    .pack 1
    .size 16
  } // end of class '__StaticArrayInitTypeSize=16'

  .field static assembly valuetype '<PrivateImplementationDetails>{BBD579E9-E0EB-4343-80D6-C96C5B27569F}'/'__StaticArrayInitTypeSize=16' '$$method0x6000001-1' at I_00002050
} // end of class '<PrivateImplementationDetails>{BBD579E9-E0EB-4343-80D6-C96C5B27569F}'


// =============================================================

.data cil I_00002050 = bytearray (
                 01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00) 
// *********** DISASSEMBLY COMPLETE ***********************
// Warnung: Win32-Ressourcendatei "P:\Rainer\DotNetQuizSamples\Applications\ValueVsReferenceTypes\bin\Debug\\ValueVsReferenceTypes.res" wurde erstellt.

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
software architects
Austria Austria
Hi, my name is Rainer Stropek. I am living a small city named Traun in Austria. Since 1993 I have worked as a developer and IT consultant focusing on building database oriented solutions. After being a freelancer for more than six years I founded a small IT consulting company together with some partners in 1999. In 2007 my friend Karin and I decided that we wanted to build a business based on COTS (component off-the-shelf) software. As a result we founded "software architects" and developed the time tracking software "time cockpit" (http://www.timecockpit.com). If you want to know more about our companies check out my blogs at http://www.software-architects.com and http://www.timecockpit.com or take a look at my profile in XING (http://www.openbc.com/hp/Rainer_Stropek2/).

I graduated the Higher Technical School for MIS at Leonding (A) in 1993. After that I started to study MIS at the Johannes Kepler University Linz (A). Unfortunately I had to stop my study because at that time it was incompatible with my work. In 2005 I finally finished my BSc (Hons) in Computing at the University of Derby (UK). Currently I focus on IT consulting, development, training and giving speeches in the area of .NET and WPF, SQL Server and Data Warehousing.

Comments and Discussions