thi chuan c#

Upload: moriaptech85

Post on 09-Apr-2018

224 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/8/2019 Thi chuan C#

    1/50

    10: We write the contents of the dataset to an XML file using the___method of thedataset object (Chng ti vit ni dung ca dataset mt file XML s dng phng php___ ca i tng dataset)

    [A]WriteStartElementO [B]Wr iteStartDocu mentO[C]WriteXmlO [D]WriteQ

    12 : How can we create the object dynamically in C#?(Lm th no chng ta c th to i tng ng trong C #?)[A]By using the System .Activator.CreatelnstanceO method tocreate an instance of object in the following manner.Type myObjectType =Type.GetTypeFromProgID("MyDll.MyOName")object my Object = System.Activator.CreaHnstance (myObjectType)[B]

    In C#, Object cannot be instantiated at run time but a method of a class can be invoked.[C]C# does not allow instantiation of objects at run time.[D]

    By using the System.Reflection.

    CreatelnstanceO method to create

    instanrR nf nhiprf in thfi frillnwinn m^nnRr,

    13: How many CCWs are created by the runtime to manage more then one COM client ?(13: Lm th no CCWs c to ra bi rt nhiu thi gian qun l nhiu hn th mttrong nhng khch hng COM?)

    [A]One CCW can handle any number of COM clients[B]The number of CCWs is equal to the number of COM clients.[C]Five CCWs are created to handle more then one COM clients.

    15: Resource Writer class is present in the_____namespace.(15: Ti nguyn Writer lp l hin din trong khng gian tn _____.)[A]Sy tern. Drawing[B]System[C]System.Resources

    [D]System.Writer17: The _____ attribute enumerator is applied for any class elements,(17: Cc thuc tnh _____ Enumerator c p dng cho bt k yu t lp hc,)[A]AttributeTargets. All Classes

    [B]None of those

    [C]AttributeTargets.All[D]AttributeTargets.Class19: The first parameter of XMLTextWriter specifies the filename which we have tocreate, whereas the second parameter specifies___________

  • 8/8/2019 Thi chuan C#

    2/50

    (Thaham s u tin ca XMLTextWriter xc nh tn tp tin m chng ti to ra,trong khi cc tham s th hai xc nh ___________)[A]Encoding Style

    [B]Format of the file[C]Path of the file

    2: ReadXML() and WriteXML() methods belong to the_____class.(ReadXML () v WriteXML () phng php thuc v lp _____)[A]Dataset [B]XmlTextWriter

    [C]SqlConnection [D]SqlDataAdapter

    20 : Identity the syntax of the GetDirectories method of System JO.Directory class,(Identity c php ca phng php GetDirectories ca lp H thng JO.Directory,)[A]arrl[] GetDirectoriesO; [B]string [] GetDirectories(stringPath);[C]void GetDirectories (string Path); [D]string GetDirectoriesO;

    22: The .net Framework SDK 2 provides the user with a tool called____to peek into theassemblies and explore the classes available within them.(The net Framework. SDK 2 cung cp cho ngi s dng vi mt peek called____tocng c vo hi ng v khm ph nhng lp hc c sn trong chng.)[A] Lock [B] SN[C] Explr [D] ILDASM

    24: Code developed outside the .NET Framework is called_____(24: M s pht trin bn ngoi NET Framework. c gi l _____)[A]protected code [B]unmanage code

    [C]managed code

    26: The TlbExp Utility creates the proxy for the COM Dlls,[A] False [B] TRUE27: In order to call a .NET component from a COM client you need to first register theassembly using the ____ utility.( gi cho mt thnh phn. NET COM t mt khch hng u tin bn cn phi ngk lp rp bng cch s dng tin ch ____.)[A] TlbExp[B] RegAsm

    28: When an object of the COM component is created in a .NET managed environment;how is the object destroyed?(Khi mt i tng ca cc thnh phn COM c to ra trong mt mi trng cqun l NET.; Nh th no l i tng tiu hu?)[A]The object is destroyed when the count reaches zero[B]The object is destroyed by the CLR[C]This issue is addressed by the RCW

    3: The Document Object Model is implemented in .NET using the_______class.

  • 8/8/2019 Thi chuan C#

    3/50

    (DOM c thc hin trong lp hc bng cch s dng NET)[A]XMLReader[B]XMLNode[C]XMLNodeList[D]XMLDocument

    30: The________utility can be used to convert a COM Type Library into a .NETassembly*(Cc tin ch ________ c th c s dng chuyn i mt COM Loi Th vinthnh mt hi ng NET. *)[A] TlBLib[B] TlBDet[C] TlBExp[D] TlbImp

    31: Which one of the following classes allows you to transform documents using

    stylesheets in XML?(M mt trong nhng lp hc sau y cho php bn bin i cc ti liu s dng trongXML stylesheets?)[A]System.XML.Xpath[B]System.XML.Style[C]System. XML.Schema[D] System.XML.Xsl

    32: Which of the following statements are true about the Reflection API? (Choose 2)(M cc bo co sau y l ng s tht v API Reflection? (Chn 2))[A]It can at times even be used to emit Intermediate Language code on the fly so that the

    generated code can be executed directly.[B]It can be used to effectively find all the types in an assembly and/or dynamically

    invoke methods in an assembly,

    [C]IT cannot be used to manipulate other objects on the .NET platform.[D]The Reflection API uses the System.Reflection namespace, with the Reflection

    class to identify the type of the Class being reflected,

    34: Version number of an assembly are stored in the following format:(Phin bn s lp rp mt c lu tr trong cc nh dng sau:)[A]< Minor version >...

    [B]< Minor version >...[C].< Minor version >..[D].< Minor version >..

    35: Which file comes with .Met framework SDK to create a Resource file ?(Nhng tp tin i km vi SDK khun kh. Met to mt tp tin ti nguyn?)[A]Resin.exe

    [B]Resource.exe[C]Region.exe

  • 8/8/2019 Thi chuan C#

    4/50

    [D]Resgen.exe

    36: The class_________ in System .XML is used to store, retrieve and manipulate therelational Dataset(Lp _________ trong h thng. XML c s dng lu tr, truy xut v thao tc cc

    tp d liu quan h)[A]XMLTableDocument[B]XMLDataDocument

    [C]XMLRe lationa IDocu ment38: Which of the following statements are true?(Choose 2)[A]Private assemblies have predefined vers ion ing policy.

    [B]Assemblies can be shared by installing it in the global Assembly Cache.

    [C]Private assemblies are stored in the same folder as that of an application.

    [D]Private assemblies should not be installed in subfolders below the executables folder.

    39: Adding pictures to resources of an assembly can be easily accomplished using the__________ class of the .NET Base Class Library*(Hnh nh Thm vo mt ngun lc ca hi ng c th d dng thc hin bng cch sdng cc lp __________ ca NET Base. Lp th vin *)[A]Resource Writer

    [B]AddResource[C]ResourceData[D]ResourceElements

    41: Private assemblies have no versioning policy,(hi ng t nhn khng c chnh sch versioning,)[A] FALSE[B] TRUE

    42: Custom attributes also placed in the namespace System(Tu thuc tnh cng c t trong h thng khng gian tn)[A] FALSE[B] TRUE

    44: Descriptive information in the metadata can be extracted using runtime reflectionservices(M t thng tin trong siu d liu c th c tch ra bng cch s dng cc dch vphn nh thi gian chy)[A] FALSE[B] TRUE

    45: Attributes are stored with the metadata of the element they are associated with(Thuc tnh c lu vi cc siu d liu ca phn t chng c lin kt vi)[A] FALSE[B] TRUE

  • 8/8/2019 Thi chuan C#

    5/50

    47: (Mt. NET cng l thnh phn c gi l lp rp *)A .NET component is also referred to as assembly*[A] FALSE[B] TRUE

    48: When there are no more nodes to be read in the file, the XMLReader class returns___(Khi khng c cc nt nhiu hn c c trong tp tin, cc lp XMLReader tr v _)[A]FALSE[B]EOF[C]0

    [D] 1

    49: What is the command GacUtil /i NetClientdll used for ?(Cc GacUtil lnh / i NetClientdll c s dng cho l g?)[A]To compile the assembly

    [B]To enable the assembly to be shared among several applications[C]To store the assembly in the file.[D]To generate an assembly containing metadata.

    5: Identity the correct statement/s.Statement A: Unlike private assemblies, shared assemblies which can be used by variousapplications need to be stored in Global Assembly Cache.Statement B: Unlike the GAC, the Native Image Cache does not store assemblies in ILformat but rather in their native machine dependent native code.[A]Both the Statements are false [B]Both the Statements are true

    [C]Statement 2 is true [D]Statement 1 is true

    50: The StreamReader class is the superclass of the class TextReader?(Cc lp StreamReader l lp cha ca lp TextReader?)[A] FALSE [B] TRUE

    51: Which of the following properties does the Type class have? (Choose 3)Trong cc c tnh sau y khng c lp Loi? (Chn 3)[A]IsPublic [B]IsCLass

    [C]IsMethod [D]IsCOMObject

    53: Which term is used for the data conversion from Com to .Net ?(thut ng no c s dng chuyn d liu t Com vo Net?.)[A]Data-conversion [B]Marshalling[C]Type-casting [D]Marshaled

    54: The__________command gives you the output of COM type library,(Lnh _________ cung cp cho bn cc u ra ca th vin kiu COM,)[a]TlbLib [b]TlBExp

    [c]TlBImp [d]TlBDet

  • 8/8/2019 Thi chuan C#

    6/50

    56: The Timer class in the System Thread namespace provides a mechanism forexecuting a method at________(Lp Timer trong khng gian tn h thng Thread cung cp mt c ch thc hin mtphng php ________)

    [A]specified time [B]specified intervals

    57: Regardless of how many COM clients try to access the component the runtimecreates only one CCW for a managed .NET component(Bt k c bao nhiu khch hng COM th truy cp vo cc thnh phn trong thi gianchy to ch c mt bn tri cho mt thnh phn qun l NET.)[A] FALSE [B] TRUE

    58: The .exe file in .Net can be executed from any platform.(Cc exe trong.. C th c thc hin t nn tng no.)[A] FALSE [B] TRUE

    59: A key pair is created using the ____ utility(Mt cp kho c to ra bng cch s dng tin ch ____)[A]snk.exe [B]key.snk[C]key.exe [D]sn.exe

    6: _______method blocks the calling thread till the current thread ends(_______ phng php khi si ch gi in thoi n ch hin ti kt thc)[A] Block() [B]IsAlive()[C] Join() [D] Sleep()

    60: Which of the following statement/s with reference to Dllimport attribute is/areTRUE?(o ca cc tuyn b sau / s vi tham chiu n thuc tnh DllImport l / l TRUE?)[A]It can import a file written in Visual basic only.[B]It can import a file written in any programming language

    61: In C#,_________-is a mechanism of adding metadata to a programming element(Trong C #,_________- l mt c ch thm vo mt yu t siu d liu lp trnh)[A]Annotation[B]Attribute

    [C]Assembly[D]Reflection

    62_________describe the methods, types, IL and resource,(_________ M t cc phng php, cc loi, IL v ti nguyn,)[A]Resource-Metadata[B]Metadata[C]IL-Metadata[D]Type-Metadata

  • 8/8/2019 Thi chuan C#

    7/50

    63: .NET client and COM clients can simultaneously make calls to the same .NETcomponent.(NET client. COM v khch hng c th ng thi thc hin cuc gi n cng. Thnhphn NET.)

    [A] FALSE[B] TRUE

    65: Reentrant is___[A]an portion of code which is accessed by multiple threads at the same time

    [B]a mechanism to implement thread management[C]a method which is thread-safe

    66: What is the purpose of the Exists method of System.10.Directory class?(mc ch ca phng php Tn ti ca System.10.Directory lp hc l g?)[A]No such method exists.

    [B]It gets the current directory[C]It checks whether the given path refers to an existing directory[D]It checks whether the directory exists and deletes it.

    8: If the .NET component needs to be accessed from more than one application, the.NET component then needs to be a shared assembly and has to be installed on the GAC.(Nu thnh phn NET. Cn phi c truy cp t nhiu hn mt ng dng, cc. NETthnh phn sau cn phi c mt hi ng chia s v c ci t trn GAC.)[A] FALSE[B] TRUE

  • 8/8/2019 Thi chuan C#

    8/50

    1 What is the purpose of the Dlllmport attribute in C#?

    A It is used to provide information to the runtime about the behaviour of C#elements such as classes and assemblies.B It is used to conditionally prevent or allow execution of a block of code.

    C It is used for interoperability with legacy and unmanaged code.----------------Cau nay dung

    D It is used to perform checks on whether a symbol has been defined or not.

    2 The assemblies expose their MetaData through a process known as

    _____________.

    A Self DescribingB Versioning ----------------Cau nay dung

    C Reflection3 The ________attribute enumerator is applied for any class elements.

    A AttributeTargets.All

    B AttributeTargets.ClassC AttributeTargets.AllClassesD None of those

    4 Which of the following statement/s with reference to Dllimport attribute

    is/are TRUE?

    A It can import a file written in any programming languageB It can import a file written in Visual basic only.

    5 Custom attributes can be applied to more than one programming element

    A TRUE

    B FALSE

    6 In C#, _______ is a mechanism of adding metadata to a programming

    element.

    A ReflectionB AssemblyC AttributeD Annotation

    7 We can define a custom attribute but its information cannot be retrieved

  • 8/8/2019 Thi chuan C#

    9/50

    A TRUEB FALSE

    8 Descriptive information in the metadata can be extracted using runtime

    reflection services

    A TRUEB FALSE

    9 Attributes are stored with the metadata of the element they are associated

    with

    A TRUE

    B FALSE

    10 Code developed outside the .NET Framework is called ________

    A managed codeB unmanage codeC protected code

    11 _______ attribute is used to invoke unmanage code in a C# program

    A ConditionalB ObsoleteC STAThreadD DllImport

    12 Namespace ______ is mandatory for using DllImport attribute

    A System.DiagnosticsB System.RuntimeC System.Runtime.InteropServices

    D System.Runtime.Diagnostics

    13 Which attribute is used to notify about a deprecated element

    A ConditionalB Obsolete

    C DllImportD STAThread

    14 Conditional attribute is used as debugging aid or precompilation directive

    A TRUE

    B FALSE

  • 8/8/2019 Thi chuan C#

    10/50

    15 Custom attributes also placed in the namespace System

    A TRUE

    B FALSE

    16 Which statement is FALSE about custom attribute?

    A A custom attribute class should inherit from System.Attribute classB A custom attribute class cannot be declared as privateC A metadata cannot be extracted by another application

    17 Sn.exe is used to create strong names for assemblies.

    A TRUE

    B FALSE

    18 A .NET component is also referred to as assembly.

    A TRUE ----------------Cau nay dungB FALSE

    19 Adding pictures to resources of an assembly can be easily accomplished using

    the ___________ class of the .NET Base Class Library.

    A ResourceElementsB ResourceData

    C AddResourceD ResourceWriter

    20 ________ is a unit of class deployment.

    A An AssemblyB A ManifestC An Executable file

    21 The extension of an assembly is _________

    A .exeB .dll

    C .csD .ddl

    22 A key pair is created using the _______utility.

    A key.exeB sn.exe

  • 8/8/2019 Thi chuan C#

    11/50

    C snk.exeD key.snk

    23 Private assemblies have no versioning policy.

    A TRUEB FALSE

    24 The _____ package forms the basic unit of versioning.

    A An Assembly ----------------Cau nay dungB A ManifestC An Executable file

    25 The syntax to create an assembly file is:

    A csc/out:/target B csc /out:/library ----------------Cau nay dung

    C csc /out:/target:library D csc /out: /target: library

    26 For versioning the private assemblies, the CLR simply loads the newest

    assemblies found in the application directory.

    A TRUE ----------------Cau nay dung

    B FALSE

    27 Identify the correct syntax for creating an executable file referencing an

    assembly.

    A csc /out:< executable name >/r:/library:exe B csc /out:< executable name >/target:exe /r: C csc /out:/target /r:D csc /out:< executable name > /target:exe /r: ----------------Cau naydung

    28 Version number of an assembly are stored in the following format:

    A < Minor version >...B .< Minor version >..

  • 8/8/2019 Thi chuan C#

    12/50

    C .< Minor version >..

    D < Minor version >...

    29 The information about a class can be found out using ________

    A AssembliesB ManifestC Reflection

    D Delegates

    30 The manifest contains data that ___ (Choose 2)

    A contains set of types that form a logical unit .B describes the resources to form a logical unit of functionality.C describes how the elements in assembly are related to each other.

    D describes the other assemblies on which the elements of the assemblyare dependent.

    31 Which of the following commands can be used to create assembly named

    "myAssembly" from the files "file1.cs and file2.cs"?

    A csc /out:myAssembly /target:library file1.cs file2.csB csc /out:myAssembly.dll /target:library file1.cs file2.cs

    C csc /out:myAssembly.dll /target:library file1.cs /target:library file2.cs

    D csc /out:myAssembly.dll /target:library file1.cs /out:myAssembly.dll/target:library file2.cs

    32 The global assemblies are saved in the _________

    A in the :\WINNT\Assembly folder.

    B Parent folder of the calling application.C sub folder within the folder containing the calling application.D same folder as the calling application.

    33 If there is a change in the major number or minor number of the version

    number it indicates that __s_____

    A the assembly is incompatible with previous versions of that assembly.

    B a very minor change has been made to the assembly.C assembly maybe compatible with previous versions of that assembly.

    34 The programmer has an assembly named pri.dll which other programmer

    also wants used the same assembly.

  • 8/8/2019 Thi chuan C#

    13/50

    Which of the following are the correct statements when executed will satisfy

    the above needs.

    A sn key1.snk

    csc /out:pri.dll /target:library file2.cs /a .keyfile:key.snkgautil -I pri.dll

    B sn -k key1.snk csc /out:pri.dll /target:library file2.cs /a .keyfile:key.snkgautil pri.dll

    C sn -k key1.snk

    csc /out:pri.dll /target:library file2.cs /a .keyfile:key.snk

    gautil -I pri.dll

    35 Which of the following statements are true?(Choose 2)

    A Assemblies can be shared by installing it in the global Assembly

    Cache.

    B Private assemblies should not be installed in subfolders below theexecutables folder.C Private assemblies are stored in the same folder as that of an application.

    D Private assemblies have predefined versioning policy.

    36 The .net Framework SDK 2 provides the user with a tool called ___________

    to peek into the assemblies and explore the classes available within them.

    A SNB ILDASM ----------------Cau nay dungC Explr D Lock

    37 Which one of the following statement/s with reference to Shared Assemblies

    is NOT TRUE?

    A Shared assemblies are the default type of assembliesB For a shared assembly to be used by many applications there should be nonaming clashC The shared assembly must have an identifier which makes it unique acrossthe entire system.D You must generate a new strong name for each and every shared assemblythat you wish to create.

  • 8/8/2019 Thi chuan C#

    14/50

    38 When we use a __________ assembly, the assembly file is not copied onto the

    applications directory but remains in the GAC folder.

    A PrivateB Shared ----------------Cau nay dung

    39 What does a change in the build number of the version number indicate?

    A It indicates that the assembly maybe compatible with previous versions ofthat assembly

    B It indicates that a very minor change has been made to the assembly----------------Cau nay dung

    C It indicates that the assembly is incompatible with previous versions ofthat assembly

    40 Identify the correct statements.

    Statement A: An assembly consists of a set of types and resources that form a

    logical unit of functionality.

    Statement B: An assembly consists of a manifest that contains information,

    which describes the assembly.

    A Statement 1 is trueB Statement 2 is trueC Both the Statements are true ----------------Cau nay dungD Both the Statements are false

    41 Identify the correct statements.

    Statement A: Unlike private assemblies, shared assemblies which can be used

    by various applications need to be stored in Global Assembly Cache.

    Statement B: Unlike the GAC, the Native Image Cache does not store

    assemblies in IL format, but rather in their native machine dependent native

    code.

    A Statement 1 is trueB Statement 2 is trueC Both the Statements are true ----------------Cau nay dungD Both the Statements are false

    42 The ________ Command Line Option is used to list assemblies from the

    GAC.

    A /l ----------------Cau nay dung

  • 8/8/2019 Thi chuan C#

    15/50

    B /iC /uD /a

    43 What is the command GacUtil /i NetClient.dll used for ?

    A To store the assembly in the file.B To generate an assembly containing metadata.C To compile the assemblyD To enable the assembly to be shared among several applications

    ----------------Cau nay dung

    44 The _______ command in C# is used to view the content of Assemblies and

    the manifest.

    A csc.exe

    B Resgen.exeC ILDASM.exe ----------------Cau nay dungD view.exe

    45 _________ describe the methods, types, IL and resource.

    A MetadataB Type-MetadataC IL-MetadataD Resource-Metadata----------------Cau nay dung

    46 Which of the following is/are not a part of the Assembly?

    A Assembly MetadataB MSIL CodeC Type MetadataD ResourcesE GAC utility ----------------Cau nay dung

    47 Which part of the assembly displays the picture file or sound file ?

    A Assembly MetadataB MSIL CodeC Type MetadataD Resources ----------------Cau nay dung

    48 Which file comes with .Net framework SDK to create a Resource file ?

    A Resource.exeB Resgen.exe ----------------Cau nay dung

  • 8/8/2019 Thi chuan C#

    16/50

    C Region.exeD Resin.exe

    49 ResourceWriter class is present in the _________ namespace.

    A System.Resources ----------------Cau nay dungB System.Writer C Sytem.DrawingD System

    50 What is the purpose of the Exists method of System.IO.Directory class?

    A It checks whether the directory exists and deletes it.B It checks whether the given path refers to an existing directory

    ----------------Cau nay dungC It gets the current directory

    D No such method exists.51 Identify the syntax of the GetDirectories method of System.IO.Directory

    class.

    A string[] GetDirectories(stringPath); ----------------Cau nay dungB string GetDirectories();C void GetDirectories(string Path);D arr1[] GetDirectories();

    52 The default mode in the FileStream class is ___________ read/write

    operations

    A synchronous ----------------Cau nay dungB asynchronousC sequentialD random

    53 The StreamReader class is the superclass of the class TextReader?

    A TRUE ----------------Cau nay dungB FALSE

    54 Stream class support a two-way stream (input and output)

    A TRUE ----------------Cau nay dungB FALSE

    55 Which class is used to write primitive types to a stream

  • 8/8/2019 Thi chuan C#

    17/50

    A StreamB BinaryWriter ----------------Cau nay dungC TextWriter D StreamWriter

    56 A stream to encrypt or zip data can be created

    A TRUE ----------------Cau nay dungB FALSE

    57 Multithread can help to improve application responsiveness

    A TRUE ----------------Cau nay dungB FALSE

    58 Which class in the System.Threading namespace is used to sunchronize

    access to objects?

    A ThreadB ThreadPoolC Monitor ----------------Cau nay dungD Timer

    59 The Timer class in the System.Thread namespace provides a mechanism for

    executing a method at _______

    A specified intervals ----------------Cau nay dungB specified time

    60 ThreadStart is a _________

    A interfaceB classC abstract classD delegate ----------------Cau nay dungE event

    61 Which statement is true to create a thread

    A Thread t = new Thread();B Thread t = new Thread(new ThreadStart(CallbackMethodName));

    ----------------Cau nay dungC Thread t = new Thread(new ThreadStart());D Thread t = new Thread(CallBackMethodName);

    62 Multithreading can be implemented in .NET by (choose 2)

  • 8/8/2019 Thi chuan C#

    18/50

    A ThreadStart ----------------Cau nay dungB Create new class that implement IThreadable interfaceC ThreadPool class ----------------Cau nay dung

    63 ______ is the main class for creating threads and controlling them

    A Thread -B ThreadPoolC ThreadStartD Monitor ---------------Cau nay dungE WaitHandle

    64 ______ contains operationg system-specific objects that wait for access to

    shared resources

    A ThreadB ThreadPoolC ThreadStartD Monitor E WaitHandle ----------------Cau nay dung

    65 ______ comprises a set of threads that can be used for posting work items,processing asynchronous I/O, waiting on

    behalf of other threads, and processing timers

    A WaitHandleB ThreadPool ----------------Cau nay dungC Timer D Monitor

    66 The methods represented by ThreadStart can return any type

    A TRUEB FALSE ----------------Cau nay dung

    67 The methods represented by ThreadStart can have zero, one or more parameters

    A TRUEB FALSE ----------------Cau nay dung

    68 An instance of a class which defines the method containing task action needs tobe created before starting a thread object

    A TRUE ----------------Cau nay dung

  • 8/8/2019 Thi chuan C#

    19/50

    B FALSE

    69 The start method in the Thread class starts immediately the thread execution

    A TRUE

    B FALSE ----------------Cau nay dung70 Only the Thread class can be used to create a thread object

    A TRUE ----------------Cau nay dungB FALSE

    71 _______ method blocks the calling thread till the current thread ends

    A Sleep()B Join() ----------------Cau nay dung

    C IsAlive()D Block()

    72 Which property returns a value that contains the state of the current thread.

    A ThreadState ----------------Cau nay dungB StateC CurrentState

    73 Which statements are TRUE about thread?

    A Thread.Priority() method is used to set and get priorities of threadsB Priority level values come from the ThreadPriority enumeration of namespaceSystem.Threading ----------------Cau nay dungC ThreadHighest is the priority value for highest priorityD A thread must be in the Running state before the operation system can schedule it

    ----------------Cau nay dung

    74 A portion of code which is accessed by multiple threads at the same time is called______

    A ReentrantB Critical section ----------------Cau nay dungC Immutable object

    75 ________ is a mechanism to implement thread management

    A Critical sectionB LockingC Immutable object

  • 8/8/2019 Thi chuan C#

    20/50

    D Thread pooling ----------------Cau nay dung

    76 ______ is a concept which allows only one thread to excusively access particularsections of code at a time

    A LockingB Thread pooling ----------------Cau nay dungC Reentrant

    77 Reentrant is __________

    A a method which is thread-safe----------------Cau nay dungB a mechanism to implement thread managementC an portion of code which is accessed by multiple threads at the same time

    78 Which 3 of the following statement with reference to .NET and COM are TRUE?

    A .NET is a component technology like COM ----------------Cau nay dungB .NET achieves COM interoperability by creating a proxy class for every COMcomponent that the .NET client tries to access. ----------------Cau nay dungC When a .NET component is called from COM, the runtime generates a RuntimeCallable Wrapper object.D In reality, .NET does not talk to COM at all, it interacts with the RCW.

    ----------------Cau nay dung

    79 The __________ utility can be used to convert a COM Type Library into a .NETassembly.

    A TlBExpB TlbImpC TlBLib----------------Cau nay dungD TlBDet

    80 The TlbExp Utility creates the proxy for the COM Dlls.

    A TRUEB FALSE ----------------Cau nay dung

    81 If the .NET component needs to be accessed from more than one application,the .NET component then needs to be a shared assembly and has to be installed on theGAC.

    A TRUE ----------------Cau nay dungB FALSE

  • 8/8/2019 Thi chuan C#

    21/50

    82 When an object of the COM component is created in a .NET managedenvironment; how is the object destroyed?

    A The object is destroyed by the CLRB The object is destroyed when the count reaches zero

    C This issue is addressed by the RCW ----------------Cau nay dung83 When a .NET component is called from COM, the runtime generates a wrapperobject known as the __________________.

    A Runtime Callable WrapperB COM Callable Wrapper ----------------Cau nay dung

    84 Regardless of how many COM clients try to access the component, the runtimecreates only one CCW for a managed .NET component.

    A TRUE ----------------Cau nay dungB FALSE

    85 .NET client and COM clients can simultaneously make calls to the same .NETcomponent.

    A TRUE ----------------Cau nay dungB FALSE

    86 In order to call a .NET component from a COM client, you need to first registerthe assembly using the _________ utility.

    A RegAsm ----------------Cau nay dungB TlbExp

    87 The Runtime Callable Wrapper does not contain any form of business logic.

    A TRUE ----------------Cau nay dungB FALSE

    88 How many CCWs are created by the runtime to manage more then one COMclient ?

    A The number of CCWs is equal to the number of COM clients.B One CCW can handle any number of COM clients ----------------Cau nay dungC Five CCWs are created to handle more then one COM clients.

    89 Which 2 of the following statements with reference to .Net components are TRUE?

  • 8/8/2019 Thi chuan C#

    22/50

    A The CLR manages the lifetime of the objects in .Net. ----------------Cau naydungB .NET clients use interfaces to learn about the functionality of the object.C .Net files can be either .dll or .pe files ----------------Cau nay dungD .Net objects must reside in the same memory location throughout the lifetime of

    the object90 The .exe file in .Net can be executed from any platform.

    A TRUE ----------------Cau nay dungB FALSE

    91 What is a Runtime callable wrapper ?

    A Run time error in .NetB It is the proxy through which .Net interacts with the COM ----------------Cau nay

    dungC An object used in .NetD A component used in .Net

    92 Which term is used for the data conversion from Com to .Net ?

    A MarshallingB Type-castingC Data-conversionD Marshaled ----------------Cau nay dung

    93 What must one do to register or unregister the .Net components in the Windowsregistry ?

    A Write the code for registering/unregistering .Net components in the assembly.B Run RegAsm.exe on the command line ----------------Cau nay dungC Components get registered / unregistered automatically.D Register / Unregister the .Net components in the windows file.

    94 ___________ is the Proxy used by .Net to interact with COM.

    A Runtime Callable Wrapper ----------------Cau nay dungB Executable Callable WrapperC Route Callable Wrapper

    95 The ___________ command gives you the output of COM type library.

    A TlBExp ----------------Cau nay dungB TlBImpC TlBLib

  • 8/8/2019 Thi chuan C#

    23/50

    D TlBDet

    96 One of the overloaded constructors of the XmlTextWriter takes in twoparameters; the first being the filename for the XML text file that is to be created and thesecond is the _________.

    A EnvironmentPermissionB Encoding style----------------Cau nay dungC Version No.D File path

    97 The WriteStartDocument() method of the XmlTextwriter class writes the XMLdeclaration with the version _________.

    A "1.0" ----------------Cau nay dungB "0.0"

    C "0.1"D "1.1"E "2.0"

    98 The XMLReader class is an abstract class.

    A TRUE ----------------Cau nay dungB FALSE

    99 We write the contents of the dataset to an XML file using the ___________method of the dataset object.

    A WriteStartDocument()B Write()C WriteXml() ----------------Cau nay dungD WriteStartElement()

    100 Identify the correct statement/s.

    Statement A: The WriteStartDocument() method of the XmlTextWriter class writes thespecified start tag.

    Statement B: The WriteStartElement() method of the XmlTextWriter class writes thespecified specified XML declaration.

    A Statement 1 is trueB Statement 2 is trueC Both the Statements are trueD Both the Statements are false ----------------Cau nay dung

  • 8/8/2019 Thi chuan C#

    24/50

    101 When there are no more nodes to be read in the file, the XMLReader class returns________.

    A 0

    B 1 ----------------Cau nay dungC FALSED EOF

    102 Identify the correct statement/s.

    Statement A: The XMLNodeList is an ordered list of nodes but the data represented bythem is not live.

    Statement B: The XMLNode and the XMLNodeList class collectively make up the coreof the DOM implementation in .NET.

    A Statement 1 is trueB Statement 2 is true ----------------Cau nay dungC Both the Statements are trueD Both the Statements are false

    103 The XmlValidatingReader is an implementation of the __________ class.

    A XmlReader ----------------Cau nay dungB XmlTextReader C ReadStringD ValidatingXML

    104 The Document Object Model is implemented in .NET using the _________ class.

    A XMLNode ----------------Cau nay dungB XMLNodeListC XMLReader D XMLDocument

    105 Which 2 of the following statements with reference to XSLT are TRUE?

    A XSLT is used to provide the graphics utility to the XML documentB XSLT is used to map more then one XML document ----------------Cau naydungC XSLT can be used with various languages ----------------Cau nay dung

    106 The __________ method of the XMLTextWriter class writes the specified starttag.

  • 8/8/2019 Thi chuan C#

    25/50

    A WriteStartElement() ----------------Cau nay dungB WriteStartDocument()C WriteStartTag()D WriteStartAttribute()

    107 XMLValidatingReader class provides the validation against:

    A XDR schemasB XML schemasC DTDs schemasD All of the above ----------------Cau nay dungE None of the above

    108 Which one of the following classes allows you to transform documents usingstylesheets in XML?

    A System.XML.StyleB System.XML.Xsl ----------------Cau nay dungC System.XML.SchemaD System.XML.Xpath

    109 ReadXML() and WriteXML() methods belong to the _________class.

    A SqlConnectionB SqlDataAdapter C Dataset ----------------Cau nay dungD XmlTextWriter

    110 All valid XML documents are well formed but not all well formed XMLdocument are valid.

    A TRUE ----------------Cau nay dungB FALSE

    111 Which of the following classes in System.XML namespace gives the treerepresentation of the XML document, so that we can navigate through the entiredocument and edit if required ?

    A XmlReader B XmlWriter----------------Cau nay dungC XmlDocumentD XMLValidatingReader

    112 The first parameter of XMLTextWriter specifies the filename which we have tocreate, whereas the second parameter specifies ___________.

  • 8/8/2019 Thi chuan C#

    26/50

    A Path of the fileB Format of the fileC Encoding Style ----------------Cau nay dung

    113 The class _____________ in System.XML is used to store, retrieve andmanipulate the relational Dataset.

    A XMLDataDocument ----------------Cau nay dungB XMLTableDocumentC XMLRelationalDocument

    114 Identify the 2 abstract classes from the list given below.

    A XmlReader ----------------Cau nay dungB XmlWriter ----------------Cau nay dung

    C XmlDocumentD XmlTextWriter

    115 Which class will point you towards the innerdata of the XML document ?

    A XMLInner B XmlWriter C XMLReader D XMLNode ----------------Cau nay dung

    116 Which of the following statements are true about the Reflection API? ( Choose 2)

    A It can be used to effectively find all the types in an assembly and/or dynamicallyinvoke methods in an assembly. ----------------Cau nay dungB IT cannot be used to manipulate other objects on the .NET platform.C It can at times even be used to emit Intermediate Language code on the fly so thatthe generated code can be executed directly. ----------------Cau nay dungD The Reflection API uses the System.Reflection namespace, with the Reflectionclass to identify the type of the Class being reflected,

    117 Which of the following statements best illustrates the use of the Reflection API.( Choose 3)

    A Obtains Class and Type Information from an Assembly ----------------Cau naydungB Translates a stream of input characters into a stream of input elementsC Obtains Member Information from a Class ----------------Cau nay dungD Dynamically Invokes Methods from Classes in an Assembly ----------------Cau nay dung

  • 8/8/2019 Thi chuan C#

    27/50

    118 Which of the following properties does the Type class have? (Choose 3)

    A IsCLassB IsMethodC IsPublic ----------------Cau nay dung

    D IsCOMObject ----------------Cau nay dung119 Which of the following statements are true? ( Choose 2)

    A A .NET executable program cannot directly reference a .NET DLL module.B Windows 2000 operating System is capable of loading two assemblies with thesame name but different version numbers. ----------------Cau nay dungC Reflection APIs does not allow creating of assembly in memory dynamically.D The Reflection API allows creating types on the fly and invoking methods onthem. ----------------Cau nay dung

    120 How can we create the object dynamically in C#?A C# does not allow instantiationof objects at run time.

    B By using the System.Reflection.CreateInstance() method to createan instance of object in the following manner.Type myObjectType = Type.GetTypeFromProgID

    ("MyDll.MyObjectName")object myObject = System.Reflectrion.

    CreatInstance(myObjectType)

    C By using the System.Activator.CreateInstance() method tocreate an instance of object in the following manner.Type myObjectType =Type.GetTypeFromProgID("MyDll.MyOName")

    object myObject = System.Activator.CreatInstance(myObjectType)

    ----------------Cau nay dungD In C#, Object cannot be instantiatedat run time but a method of aclass can be invoked.

    121 using System.Reflection;using System;class Reflect{

  • 8/8/2019 Thi chuan C#

    28/50

    public int i=20;public char ch=a;public float f1=10;public void GetFloat(){Console.WriteLine(f1);

    }public void GetInt(){Console.WriteLine(i);}public void GetChar(){Console.WriteLine(ch);}}class TCPReflection{public static void Main()

    {Reflect sender = new Reflect();Type t = sender.GetType();MemberInfo [] members = t.GetMembers();MethodInfo [] method = t.GetMethods();FieldInfo [] f1=t.GetFields();Console.WriteLine("No of memebers:"+members.Length);Console.WriteLine("No of fields:"+f1.Length);}}

    What will be the output of above code when compiled/run?

    A The code will generate a compile time errorB The output of above code will be:No of members : 11No of fields: 4

    C The output of above code will be:No of members : 11No of fields: 3

    ----------------Cau nay dungD The output of above code will be:No of members : 12No of fields: 3

    122 Through which process does the assembly expose its Metadata ?

  • 8/8/2019 Thi chuan C#

    29/50

    A ReactionB ActionC Reflection

    D Interaction

    Q.1) This feature prevents multiple threads from simultaneously modifying the state ofthe resource , by including various classes and data types.

    A. Parallel execution of code.B. Thread interruptionC. Thread SynchronizationD. Mutual ExclusionE. Thread Waiting

    Q.2) This feature is the mechanism of blocking a thread util some condition becomes trueA. Thread SynchronizationB. Join

    C. Thread Waiting (correct answer)

    Q.3) Synchronizes access to objects

    A. MonitorB. TimerC. ThreadPool

    Q.4) Contains operating system-specific objects that wait for access to shared resources.

    A. TimeOutB. WaitHandle

    C. Thread

    Q.5) This retrieves a value which indicates whether a thread belongs to the managedthread pool.

    A. IsAliveB. ManagedThreadIdC. IsThreadPoolThread (your answer)

    D. ThreadState

    Q.6) Retrieves the value of execution status of the current thread.

  • 8/8/2019 Thi chuan C#

    30/50

    A. IsAliveB. CurrentThread

    C. ThreadState

    Q.7) Retrieves a value which contains the state of the current thread.

    A. CurrentThreadB. ThreadStateC. IsAlive (correct answer)

    Q.8) Priority retrieves or specifies a value which indicates the scheduling priority of athread.

    A. True (your answer)B. False

    Q.9) This method blocks the calling thread till the thread ends.

    A. SleepB. StartC. Join (your answer)D. Interrupt

    Q.10) This method obstructs the current thread for the specified time.

    A. JoinB. Sleep

    C. Abort

    Q.11) A Thread must be in the Running state before the operating System can schedule it.

    A. True (correct answer)B. False

    Q.12) The default priority of a thread is:

    A. HighestB. Normal (your answer)C. AboveNormal

    D. Lowest

    Q.13) This is a language for retrieving information from a XML Document. is used to

  • 8/8/2019 Thi chuan C#

    31/50

    navigate through elements and attributes in an xml document.

    A. XQueryB. XPath (correct answer)C. SXLT

    D. SLT

    Q.14) An XPath expression are returns: - 3 choices

    A. a node set

    B. a integer valueC. a boolean

    D. a String and a number

    Q.15) Steps to add data into an existing XML file.

    1. Create a Method to create new element2. add the element after the last child node.3. write value to the element.4. Declare the objects5.Save the file.

    A. 1-2-3-4-5B. 3-1-2-4-5C. 4-1-2-3-5D. 4-1-3-2-5 (correct answer)

    Q.16) This is an abstract class that provides a cursor model for navigating and editingXMl data.

    A. XPathB. XQuery

    C. XEditD. XPathNavigator (correct answer)

    Q.17) How to declare Attributes:

    A.[AttributeName(parameters)]

    Element_Name(parameter){//Implementation}

    B.[AttributeName(parameters)];Element_Name(parameter){//Implementation}

    Q.18) This attribute can be used as debugging aid in the C# code.

  • 8/8/2019 Thi chuan C#

    32/50

    A. DLLImportB. Conditional (correct answer)

    C. Obsolete

    Q.19) Which statements are true? - 3 choices

    A. Custom attributes cannot be applied to more than one programming element

    B.Attributes are a mechanism of adding metadata to a programming element

    (your answer)

    C. Attribute information can not be retrieved from custom attributes

    D.Descriptive information in the metadata can be extracted using runtime

    reflection services. (your answer)

    E.Attributes are stored with the metadata of the element they are associated

    with. (your answer)

    Q.20) Code developed outsite the .net framework.

    A. DLLImportB. System.Diagnostics

    C. Unmanaged Code

    Q.21)Namespace is mandatory for using DLLImport attribute

    A. System.DLLImportB. System.Runtime.InteropServices (correct answer)C. System.Diagnostics

    Q.22) Used to invoke unmanaged code in a C# program.

    A. Unmanaged Code (your answer)B. Conditional Attribute

    C. DLLImport Attribute (correct answer)

    Q.23) Use as debugging aid in the C# code.

    A. Conditional Attribute (correct answer)B. System.DebugC. System.Diagnostics

  • 8/8/2019 Thi chuan C#

    33/50

    Q.24)Namespace is mandatory for using the Conditional attribute

    A. Conditional Attribute.B. System.Diagnostics (your answer)

    C. System.Runtime.InteropServicesQ.25) A DLL is a library that contains code and data that can be used by more than one

    program at the same time.

    A. TrueB. False

    Q.26) This is a phrase for complications which arise when working with dynamic link

    libraries.A. DLLsB. DLL Hell

    C. DLLImport

    Q.27) These are the building blocks used by the .Net Framework used to solve theversioning and deployment problems posed by the DLLs

    A. AssembliesB. AttributesC. XPathD. Custom Attributes

    Q.28) This is a collection of information required by the runtime to execute anapplication.

    A. CollectionB. AttributeC. DLLs

    D. Assembly (correct answer)

    Q.29) This is deployed with an application and is available only for the application.

    A. A public assemblyB. A private assembly (correct answer)C. A Shared assemblyD. A protected assembly

  • 8/8/2019 Thi chuan C#

    34/50

    Q.30) A assembly consists of parts:

    - 3 choices

    A. DLLs

    B. Assembly MetadataC. Type MetadataD. Dll Hell

    E. MSIL Code & Resources

    Q.31) A namespace can contain one or more assemblies and an assembly can contain oneor more namespaces.

    A. True (correct answer)B. False

    Q.32) Which statements are true with assembly.- 3 choices

    A.Multiple applications can not implement the same DLL file due to versioningproblem

    B. DLLs use fewer resource (your answer)

    C.Modular programs cannot be built using Dynamic Link Library (youranswer)

    D.Applications must be self describing so that they are no longer dependent ofthe registry entries. (your answer)

    Q.33) Collection of information existing in binary form in a Portable Executable file ora .Net assembly.

    A. Type metadataB. Assembly metadata (correct answer)C. MSIL Code

    Q.34) File such as JPEG, text, XML and other types that are used in the application.

    A. MSIL CodeB. Resource (your answer)

    C. Multifle Assembly

    Q.35) Data present in the assembly and its type.

    A. Assembly MetadataB. Type Metadata (correct answer)

  • 8/8/2019 Thi chuan C#

    35/50

    Q.36) Compilers convert the source code into an intermediate language.

    A. AssemblyB. MSIL Code

    C. Resource

    Q.37) The System.IO namespace in .Net does not support stream handling.

    A. TrueB. False (your answer)

    Q.38) The class named File is a member of System.IO namespace.

    A. True (your answer)B. False

    Q.39) This class reads primary data types as binary values in a specific encoding.

    A. TextReaderB. BinaryReaderC. FileStream

    Q.40) This class provides methods for creating, moving and enumerating throughdirectories and sub-directories.

    A. DirectoryInforB. Directory

    C. MemberInfor

    Q.41) This class provides instance methods for creating, moving and enumeratingdirectories and sub-directories.

    A. DirectoryInforB. DirectoryC. File

    Q.42) This class provides static methods for creating and manipulating files.

    A. FileStreamB. FileC. FileInfor

    D. FileSystemInfor

  • 8/8/2019 Thi chuan C#

    36/50

    Q.43) This class contains methods that are common to file and directory manipulation.

    A. StreamB. FileSystemInfor (correct answer)C. FileInfor

    D. File

    Q.44) The TextReader class represents a reader that can read a sequence of characters.

    A. True B. False

    Q.45) This class is used to read and write data to memory instead of a disk.

    A. BufferedStream

    B. MemoryStreamC. FileStreamD. CrypttoStream

    Q.46) This class is not part of the system.IO namsepace, It resides within theSystem.security.

    A. NetWorkStreamB. CryptoStream

    Q.47) These classes are not part of the System.IO namspace.

    A.NetWorkStream (your answer)B. CryptoStream (your answer)C. BufferStreamD. MemoryStream

    Q.48) This class can be used for operations such as creating, copying, moving, deletingand appending to files.

    A. FileStreamB. FileInfor (correct answer)C. File

    D. FileManipulate

    Q.49) The FileInfor class is used to create FileStream Object.

  • 8/8/2019 Thi chuan C#

    37/50

    A. True (your answer)B. Fasle

    Q.50) In Directory class, this method returns a DirectoryInfor object which can be used to

    work with the newly created directory.A. CreateDirectoryInfor();B. CreateDir();

    C. CreateDirectory()

    Q.51) This method of Directory class is also used to rename the directory.

    A. Rename();B. Move();C. Delete();

    D. ReMove();

    Q.52) Get the names of sub-directories in a specified directory.

    A. GetDirectoriesB. GetDirectory

    C. GetCurrentDirectory

    Q.53) Returns current working directory of the application.

    A. GetDirectotiesB. GetCurrentDirectoryC. SetCurrentDirectory

    Q.54) Which the terms do they belong to Directoryinfo class?- 3 choices

    A. FullNameB. CreateDirectory()C. Move()D. MoveTo()

    E. Create()

    Q.55) Re-order steps of creating a thread in C#.1.Define a method inside class.2. Create constructor.3. Define a class4. Create one or more objects of the class in the new class

  • 8/8/2019 Thi chuan C#

    38/50

    5.Create one or more Thread objects in the new class6. Start the execution of the thread.

    A. 1-2-3-4-5-6B. 2-4-5-6-1-3

    C. 3-2-1-4-5-6D. 3-1-4-5-6 (correct answer)

    Q.56) Only the Thread class can be used to create a thread object.

    A. TrueB. False

    Q.57) A portion of thread which is accessed by multiple threads at the same time.

    A. LockingB. ReentrantC. Critical Section (correct answer)D. Thread Pooling

    Q.58) This object that does not change its state after it is create.

    A. Thread objectB. Immutable object (correct answer)

    C. pool object

    Q.59) This method which id thread - safe

    A. LockingB. InterruptC. Reentrant (correct answer)

    Q.60) Which statements are true?

    A. COM has only DCOM as its technologyB. COM permits reuse of code across different environments.C. GUID is referred when COM or DCOM object is registered

  • 8/8/2019 Thi chuan C#

    39/50

    D. COM combines subsystems to form one large system.E. COM uses com-capable tool during the implementation of each subsystem.

    Q.61) This performs operations like joins, ordering and sorting

    A. XmlReader and XmlWriterB. XPathC. XQuery (correct answer)

    Q.62) Which statements are true?

    A. XML deals with the arranging of dataB. XMLDocument class enables navigation and editing (your answer)

    Q.63) A standard that helps in processing xml

    A. XmlReaderB. System.Xml namespace (correct answer)C. XQuery (your answer)

    Q.64) A class that has the ability to accept or reject changes in the document.

    A. XmlDocumentB. APathDocument (correct answer)

    C. XPathEdittableNavigator

    Q.65) XmlTextWriter is a class that is derived from XmlWriter

    A. True (correct answer)B. False (your answer)

    Q.66) WriteString() method flushes the buffer and writes whatever data is left in thebuffer to the stream.

    A. TrueB. False

    Q.67) Read the next node from the stream.

    A. XmlTextReaderB. Read method (your answer)

  • 8/8/2019 Thi chuan C#

    40/50

    Q.68) Rises when a validation error occurs

    A. ValidationEventHandle (your answer)B. validationType

    Q.69) Child operator ; selects immediate children of the left-site collectionA. //B. / (correct answer)C. ..D. *

    Q.70) Recursive descent ; searches for the specified element at any depth

    A. // (correct answer)

    B. ..C. @D. *

    Q.71) Indicates the current context.

    A. ..B. . (correct answer)C. 'D. //

    Q.72) The parent of the current context node

    A. //B. .. (correct answer)C. @

    D. *

    Q.73) Attribute ; prefix for an attribute name

    A. @B. *C. -D. //

    Q.74) wildcard; selects all elements regardless of the element name.

  • 8/8/2019 Thi chuan C#

    41/50

    A. **B. &C. #D. * (correct answer)

    E. //Q.75) Which characters do not belong to XPath expression.

    A. *B. ;

    C. .D. ?

    E. #

    1. Custom attributes also placed in the namespace System

    A. False.B. True

    2. ____ is the main class for creating threads and controlling themA. WaitHandleB. MonitorC. ThreadStartD. ThreadPoolE. Thread

    3. The methods represented by ThreadStart can return any typeA. FalseB. True

    4. The . Net Frameword SDK 2 provides the user with a tool called ____ to peekinto the assemblies and explore the classes available within them.

    A. ExplrB. LookC. SND. ILDASM

    5. The methods represented by ThreadStart can have zero, one or more parametersA. FasleB. True

    6. In C#, _______ is a mechanism of adding metadata to a programming element.A. AnnotationB. AttributeC. AssemblyD. Reflection

  • 8/8/2019 Thi chuan C#

    42/50

    7. Sn.exe is used to create strong names for essembliesA. FalseB. True

    8. If the .NET component needs to be accessed from more than one application,the .NET component then needs to be shared assembly and has to be installrd onthe GAC

    A. FalseB. True

    9. Which file comes with .NET frameword SDK to create a Resource file?A. Region.exeB. Resin.exeC. Resource.exeD. Resgen.exe

    10. What is the command GacUtil / o NetClient.dll used for?

    A. To compile the assemblyB. To store the assembly in the fileC. To generate an assembly containing metadata.D. To enable the assembly to be shared among several applications

    11. The ______ command gives you output of COM type library.A. TLBDetB. TLBExpC. TLBLibD. TLBImp

    12. Multithread can help to improve application responsivenessA. FalseB. True

    13. Identify the correct statement/sA. Sta

    14. Identify the 2 abstract classes from the list given belowA. XmlDocumentB. XmlTextWriterC. XmlReaderD. XmlWriter

    15. How many CCWs are created by the runtime to manage more then one COMclient?

    A. One CCW can handle any number of COM clientsB. The number of CCWs is equal to the number of COM clientsC. Five CCWs are created to handle more then one COM clients

    16. We write the contents of the dataset to an XML file using the ___ method of thedatase object

    A. WriteXml()B. WriteStartElement()C. WriteStartDocument()D. Write()

  • 8/8/2019 Thi chuan C#

    43/50

    17. Which of the following statement/s with reference to Dllimport attribute is/areTRUE?

    A. It can import a file written in Visual basic onlyB. It can import a file written in any programming language

    18. What must one do to register or unregister the .Net components in the Windows

    registry?A. Components get registrered / unregistered automaticallyB. Register / Unregister the .Net components in the windows file.C. Write the code for registering/unregistering .Net components in the

    assemblyD. Run RegAsm.exe on the command line.

    19. We can define a custom attribute but its information cannot be retrievedA. FasleB. True

    20. The glable assemblies are saved in the ____

    A. Sub folder within the folder containing the calling applicationB. Same folder as the calling applicationC. In the :\WINNT\Assembly folderD. Parent folder of the calling application

    21. The .exe file in .Net can be executed from any platformA. FalseB. True

    22. What does a change in the build number of the version number indicate?A. It indicates that the assembly is incompatible with previous versions of

    that assemblyB. It indicates that a very minor change has been made to the assemblyC. It indicates that the assembly maybe compatible with previous versions of

    that assembly23. Which of the following classes in System.XML namespace gives the tree

    representation of the XML document, so that we can navigate through the entiredocument and edit if required?

    A. XMLValidatingReaderB. XmlDocumentC. XmlWriterD. XmlReader

    24. A .Net component is also referred to as assemblyA. FalseB. True

    25. fdf26. The ___ utility can be used to convert a COM Type Library into a .Net assembly

    A. TlBDetB. TLBExpC. TLBLib

  • 8/8/2019 Thi chuan C#

    44/50

    D. TLBImp27. The TLBExp Utility creates the proxy for the COM Dlls

    A. FalseB. True

    28. what is a Runtime callable wrapper?A. An object used in .NETB. A component used in .NetC. Runtime error in .NetD. It is the proxy through which .Net interacts with the COM

    29. ReadXML() and WriteXML() methods belong to the ____classA. DatasetB. xmlTextWriterC. SqlConnectionD. SqlDataAdapter

    30. Which statement is true to create a thread

    A. Thread t = new Thread(new ThreadStart());B. Thread t = new Thread();C. Thread t = new Thread(new ThreadStart(CallbackMethodName));D. Thread t = new Thread(CallBackMethodName);

    31. which class in the System.Thread namespace is used to synchronize access toobjects?

    A. TimerB. ThreadC. MonitorD. ThreadPool

    32. Only the Thread class can be used to create a thread objectA. FasleB. True

    33. which one of the following statement/s with feference to Shared Assemblies isNOT TRUE?

    A. The shared assembly must have an identifier which makes it unique acrossthe entire system

    B. Shared assemblies are the default type of assembliesC. For a shared assembly to be used by many applications there should be no

    naming clashD. You must generate a new strong name for each and every shared assembly

    that you wish to create34. the start method in the Thread class stats immediately the thread execution

    A. falseB. true

    35. which of the following is/are not a part of the Assembly?A. GAC utilityB. Type Metadata

  • 8/8/2019 Thi chuan C#

    45/50

    C. MSIL CodeD. ResourcesE. Assembly Metadata

    36. Descriptive information in the metadata can be extracted using runtime reflectionservices

    A. FalseB. True

    37. fdf

    38. one of the overloaded constructors of the XmlTextWriter takes in two parameters;the first being the filename for the XML text file that is to be created and thesecond is the ____

    A. Version No.B. EnvironmentPermissionC. Encoding style

    D. File path39. Which class will point you towards the innerdata of the XML document?

    A. XMLReaderB. XMLNodeC. XMLInnerD. XmlWriter

    40. identify the sytax of the GetDirectories method of System.IO.Directory class/A. arr1[] getDirectories();B. string[] GetDirectories(stringPath);C. void GetDirectories(stringPath);D. string GetDirectories();

    41. Attibutes are stored with the metadata of the element they are associated withA. FalseB. true

    42. which statement is FALSE about custom attribute?A. A metadata cannot be extracted by another applicationB. A custom attirbute class cannot be declared as privateC. A custom attibute class should inherit from System.Attributes class

    43. err44. The StreamReader class is the superClass of the class TextReader?

    A. FalseB. True

    45. The Runtime Callable Wrapper does not contain any form of business logicA. FalseB. True

    46. which of the following properties does the Type class have? (Choose 3)A. IsCOMObjectB. IsClass

  • 8/8/2019 Thi chuan C#

    46/50

    C. IsPublicD. IsMethod

    47. Which term is used for the data conversion from Com to .Net?A. MarshaledB. Marshalling

    C. Data-conversionD. Type-casting48. _____ is a concept which allows only one thread to excusively access particular

    sections of code at a timeA. Thread poolingB. LockingC. Reentrant

    49. what is the purpose if the Eixsts method of System.IO.Directory class?A. No such method existsB. It gets the current directoryC. It checks whether the given path refers to an existing directory

    D. It checks whether the directory exists and deletes it/\.50. when there are no more nodes to be read in the file, the XMLReader classreturns___

    A. EOFB. 0C. FALSED. 1

    51. ___ is a mechanism to implement thread managementA. Immutable objectB. Thread poolingC. Critical sectionD. Locking

    52. Version number of an assembly are stored in the follwing formatA.

    53. The extension of an assembly is ______A. .ddlB. .exeC. .csD. .dll

    54. Which part of the assembly displays the picture file or sound file?A. Type MetadataB. Assembly MetadataC. MSIL CodeD. Resources

    55. Namespace ___ is mandatory foor using DllImport attributeA. System.Runtime.DiagosticsB. Systen.Runtime.InteropServicesC. System.RuntimeD. System.Dianostics

    56. A key pair is created using the ______ utility

  • 8/8/2019 Thi chuan C#

    47/50

    A. Key.snkB. Key.exeC. Snk.exeD. Sn.exe

    57. fdfdfdf

    58. For versioning the private assemblies, the CLR simply loads the newst assembliesfound in the application directoryA. FalseB. True

    59. in order to call a .Net component from a COM client, you need to first register theassembly using the ____ utility

    A. TlbExpB. RegAsm

    60. A portion of code which is accessed by multiple threads at the same time is called___

    A. Immutable objectB. Critical sectionC. Reentrant

    61. The information about a class can be found out using ___A. ReflectionB. DelegatesC. AssembliesD. Manifest

    62. ______ is the Proxy used by .Net to interact with COM.A. Executble Callable WrapperB. Runtime Callable WrapperC. Route Callable Wrapper

    63. When an object of the COM component is created in a .Net managedenvironment; how is the object destroyed?

    A. This issue is addressed by the RCWB. The object is destroyed when the count reaches zeroC. The object is destroyed by the CLR

    64. Which of the following statements are true? (Choose 2)A. Private assemblies are stored in the same folder as that of an applicatonB. Assemblies can be shared by installing it in the global Assembly CacheC. Private assemblies should not be installled in subfolders below the

    executables folderD. Private assembies have predefined version policy

    65. The ____ attribute enumerator is applied for any class elementsA. AttributeTargets.AllClassesB. None of thoseC. AttributeTargets.AllD. AttributeTargets.Class

    66. XMLValidatingReader class provides the validation against:A. DTDs schemas

  • 8/8/2019 Thi chuan C#

    48/50

    B. XML schemasC. XDR schemasD. All of the aboveE. None of the above

    67.

    2. _____is the main class for creating threads and controlling them. 1da. WaitHandleb. Monitorc. ThreadStartd. ThreadPoole. Thread

    3. The methods represented by ThreadStart can return any type.a. falseb. true

    4. The .net Framework SDK 2 provides the user with a tool called_______ to peek intothe assemblies and explore the classes available within them. 0.5da. Explrb. Lockc. SNd. ILDASM

    5. The methods represented by ThreadStart can have zero, one or more parameters. 0.5da. falseb. true

    6. In C#,_______ is a mechanism of adding metadata to a programming element.a. Annotationb. Attributec. Assemblyd. Reflection

    7. Sn.exe is used to create strong names for assemblies.a. falseb. true

    8. If the .NET component needs to be accessed from more than one application, the .NETcomponent then needs to be a shared assembly and has to be installed on the GAC.

    a. falseb. true

    9. Which file comes with .Net framework SDK to create a Resource file?a. Region.exeb. Resin.exec. Resource.exe

  • 8/8/2019 Thi chuan C#

    49/50

    d. Resgen.exe

    10. What is the command GacUtil/i NetClient.dll used for?a. To compile the assemblyb. To store the assembly in the file

    c. To generate an assembly containning metadatad. To enable the assembly to be shared among several applications.

    11. The _______ command gives you the output of COM type library.a. TlBDetb. TlBExpc. TlBLibd. TlBImp

    12. Multithread can help to improve application responsivenessa. false

    b. true31. Which class in the System.Threading namespace is used to synchronize access toobject?

    a. Timerb. Threadc. Monitord. ThreadPool

    32. Only the Thread class can be used to create a thread objecta. falseb. true

    34. The start method in the Thread class starts immediately the thread executiona. falseb. true

    41. Attribute are stored with the metadata of element they are associated witha. falseb. true

    42. Which statement is FALSE about custom attribute?

    a. A metadata cannot be extracted by another applicationb. A custom attribute class cannot be declared as privatec. A custom attribute class should inherit from System.Attribute class.

    44. The StreamReader class is the superclass of the class TextReader?a. falseb. true

  • 8/8/2019 Thi chuan C#

    50/50

    45. The Runtime callable Wrapper class does not contain any form of business logic.a. falseb. true

    46. Which of the following properties does the type class have?(choose 3)

    a. IsCOMObjectb. IsClassc. IsPublicd. IsMethod

    48. _____ is a concept which allows only one thread to excusively access particularsection of code at a time

    a. Thread poolingb. Lockingc. Reentrant

    49. What is the purpose of the Exists method of System.IO.Directory class?a. No such method existsb. It gets the current directoryc. It checks whether the given path refers to an existing directoryd. it checks whether the directory exists and deletes it.

    54. Which part of the assembly display the picture file or sound file?a. Type Metadatab. Assembly Metadatac. MSIL Coded. Resources