PrepAway - Latest Free Exam Questions & Answers

Which two code segments can you insert at line 05 to achieve this goal?

You are developing an application that generates code. The application includes the following code
segment. (Line numbers are included for reference only.)

You need to ensure that code generated by the GenerateCode() method represents a class that can
be accessed by all objects in its application domain.
Which two code segments can you insert at line 05 to achieve this goal? (Each correct answer
presents a complete solution. Choose two.)

PrepAway - Latest Free Exam Questions & Answers

A.
Option A

B.
Option B

C.
Option C

D.
Option D

5 Comments on “Which two code segments can you insert at line 05 to achieve this goal?

  1. Sampath says:

    // Creates a new type declaration.
    CodeTypeDeclaration newType = new CodeTypeDeclaration(
    // name parameter indicates the name of the type.
    “TestType”);
    // Sets the member attributes for the type to private.
    newType.Attributes = MemberAttributes.Private;
    // Sets a base class which the type inherits from.
    newType.BaseTypes.Add( “BaseType” );

    // A C# code generator produces the following source code for the preceeding example code:

    // class TestType : BaseType
    // {
    // }




    0



    0

Leave a Reply