10: We write the contents of the dataset to an XML file using the___method of the dataset object (Chúng tôi viết nội dung của dataset một file XML sử dụng phương pháp ___ của đối tượng dataset)
[C]WriteXmlO
12 : How can we create the object dynamically in C#?
(Làm thế nào chúng ta có thể tạo đối tượng động trong C #?)
[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: Làm thế nào CCWs được tạo ra bởi rất nhiều thời gian để quản lý nhiều hơn thì một trong những khách hàng COM?)
[A]One CCW can handle any number of COM clients
(15: Tài nguyên Writer lớp là hiện diện trong không gian tên _____.)
[C]System.Resources
17: The _____ attribute enumerator is applied for any class elements,
(17: Các thuộc tính _____ Enumerator được áp dụng cho bất kỳ yếu tố lớp học,)
[B]None of those
19: The first parameter of XMLTextWriter specifies the filename which we have to create, whereas the second parameter specifies___________
(Thaham số đầu tiên của XMLTextWriter xác định tên tập tin mà chúng tôi đã tạo ra, trong khi các tham số thứ hai xác định ___________)
[A]Encoding Style
2: ReadXML() and WriteXML() methods belong to the_____class.
(ReadXML () và WriteXML () phương pháp thuộc về lớp _____)
[A]Dataset
20 : Identity the syntax of the GetDirectories method of System JO.Directory class,
(Identity cú pháp của phương pháp GetDirectories của lớp Hệ thống JO.Directory,)
[D]string GetDirectoriesO;
22: The .net Framework SDK 2 provides the user with a tool called____to peek into the assemblies and explore the classes available within them.
(The net Framework. SDK 2 cung cấp cho người sử dụng với một peek called____to công cụ vào hội đồng và khám phá những lớp học có sẵn trong chúng.)
[D] ILDASM
24: Code developed outside the .NET Framework is called_____
(24: Mã số phát triển bên ngoài NET Framework. Được gọi là _____)
[B]unmanage code
26: The TlbExp Utility creates the proxy for the COM Dlls,
[A] False
27: In order to call a .NET component from a COM client you need to first register the assembly using the ____ utility.
(Để gọi cho một thành phần. NET COM từ một khách hàng đầu tiên bạn cần phải đăng ký lắp ráp bằng cách sử dụng tiện ích ____.)
[B] RegAsm
28: When an object of the COM component is created in a .NET managed environment; how is the object destroyed?
(Khi một đối tượng của các thành phần COM được tạo ra trong một môi trường được quản lý NET.; Như thế nào là đối tượng tiêu 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.
(DOM được thực hiện trong lớp học bằng cách sử dụng NET)
[D]XMLDocument
30: The________utility can be used to convert a COM Type Library into a .NET assembly*
(Các tiện ích ________ có thể được sử dụng để chuyển đổi một COM Loại Thư viện thành một hội đồng NET. *)
[D] TlbImp
31: Which one of the following classes allows you to transform documents using stylesheets in XML?
(Mà một trong những lớp học sau đây cho phép bạn biến đổi các tài liệu sử dụng trong XML stylesheets?)
[D] System.XML.Xsl
32: Which of the following statements are true about the Reflection API? (Choose 2)
(Mà các báo cáo sau đây là đúng sự thật về API Reflection? (Chọn 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,
[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:
(Phiên bản số lắp ráp một được lưu trữ trong các định dạng sau:)
[D]<Major vers ion >.< Minor version >.<Revision>.<Build Number >
35: Which file comes with .Met framework SDK to create a Resource file ?
(Những tập tin đi kèm với SDK khuôn khổ. Met để tạo một tập tin tài nguyên?)
[D]Resgen.exe
36: The class_________ in System .XML is used to store, retrieve and manipulate the relational Dataset
(Lớp _________ trong hệ thống. XML được sử dụng để lưu trữ, truy xuất và thao tác các tập dữ liệu quan hệ)
[B]XMLDataDocument
38: Which of the following statements are true?(Choose 2)
[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.
39: Adding pictures to resources of an assembly can be easily accomplished using the __________ class of the .NET Base Class Library*
(Hình ảnh Thêm vào một nguồn lực của hội đồng có thể dễ dàng thực hiện bằng cách sử dụng các lớp __________ của NET Base. Lớp thư viện *)
[A]Resource Writer
41: Private assemblies have no versioning policy,
(hội đồng tư nhân không có chính sách versioning,)
[B] TRUE
42: Custom attributes also placed in the namespace System
(Tuỳ thuộc tính cũng được đặt trong hệ thống không gian tên)
[B] TRUE
44: Descriptive information in the metadata can be extracted using runtime reflection services
(Mô tả thông tin trong siêu dữ liệu có thể được tách ra bằng cách sử dụng các dịch vụ phản ánh thời gian chạy)
[B] TRUE
45: Attributes are stored with the metadata of the element they are associated with
(Thuộc tính được lưu với các siêu dữ liệu của phần tử chúng được liên kết với)
[B] TRUE
47: (Một. NET cũng là thành phần được gọi là lắp ráp *)
A .NET component is also referred to as assembly*
[B] TRUE
48: When there are no more nodes to be read in the file, the XMLReader class returns___
(Khi không có các nút nhiều hơn để được đọc trong tập tin, các lớp XMLReader trả về _)
[C]0
49: What is the command GacUtil /i NetClientdll used for ?
(Các GacUtil lệnh / i NetClientdll được sử dụng cho là gì?)
[B]To enable the assembly to be shared among several applications
5: Identity the correct statement/s.
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.
[B]Both the Statements are true
50: The StreamReader class is the superclass of the class TextReader?
(Các lớp StreamReader là lớp cha của lớp TextReader?)
[B] TRUE
51: Which of the following properties does the Type class have? (Choose 3)
Trong đó các đặc tính sau đây không có lớp Loại? (Chọn 3)
[A]IsPublic [B]IsCLass
[D]IsCOMObject
53: Which term is used for the data conversion from Com to .Net ?
(thuật ngữ nào được sử dụng để chuyển dữ liệu từ Com vào Net?.)
[B]Marshalling
54: The__________command gives you the output of COM type library,
(Lệnh _________ cung cấp cho bạn các đầu ra của thư viện kiểu COM,)
[b]TlBExp
56: The Timer class in the System Thread namespace provides a mechanism for executing a method at________
(Lớp Timer trong không gian tên hệ thống Thread cung cấp một cơ chế để thực hiện một phương pháp ở ________)
[B]specified intervals
57: Regardless of how many COM clients try to access the component the runtime creates only one CCW for a managed .NET component
(Bất kể có bao nhiêu khách hàng COM thử truy cập vào các thành phần trong thời gian chạy tạo chỉ có một bên trái cho một thành phần quản lý NET.)
[B] TRUE
58: The .exe file in .Net can be executed from any platform.
(Các exe trong.. Có thể được thực hiện từ nền tảng nào.)
[A] FALSE
59: A key pair is created using the ____ utility
(Một cặp khoá được tạo ra bằng cách sử dụng tiện ích ____)
[D]sn.exe
6: _______method blocks the calling thread till the current thread ends
(_______ phương pháp khối sợi chỉ gọi điện thoại đến chủ đề hiện tại kết thúc)
[C] Join()
60: Which of the following statement/s with reference to Dllimport attribute is/are TRUE?
(ào của các tuyên bố sau / s với tham chiếu đến thuộc tính DllImport là / là TRUE?)
[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à một cơ chế thêm vào một yếu tố siêu dữ liệu để lập trình)
[B]Attribute
62_________describe the methods, types, IL and resource,
(_________ Mô tả các phương pháp, các loại, IL và tài nguyên,)
[A]Resource-Metadata
[B]Metadata
[C]IL-Metadata
[D]Type-Metadata
63: .NET client and COM clients can simultaneously make calls to the same .NET component.
(NET client. COM và khách hàng có thể đồng thời thực hiện cuộc gọi đến cùng. Thành phần NET.)
[A] FALSE
65: Reentrant is___
[A]an portion of code which is accessed by multiple threads at the same time
[C]a method which is thread-safe
66: What is the purpose of the Exists method of System.10.Directory class?
(mục đích của phương pháp Tồn tại của System.10.Directory lớp học là gì?)
[C]It checks whether the given path refers to an existing directory
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.
(Nếu thành phần NET. Cần phải được truy cập từ nhiều hơn một ứng dụng, các. NET thành phần sau đó cần phải được một hội đồng chia sẻ và đã được cài đặt trên GAC.)
[B] TRUE
1 What is the purpose of the Dlllmport attribute in C#?
C It is used for interoperability with legacy and unmanaged code. ----------------Cau nay dung
2 The assemblies expose their MetaData through a process known as _____________.
B Versioning ----------------Cau nay dung
3 The ________attribute enumerator is applied for any class elements.
A AttributeTargets.All
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 language
5 Custom attributes can be applied to more than one programming element
A TRUE
6 In C#, _______ is a mechanism of adding metadata to a programming element.
C Attribute
7 We can define a custom attribute but its information cannot be retrieved
B FALSE
8 Descriptive information in the metadata can be extracted using runtime reflection services
A TRUE
9 Attributes are stored with the metadata of the element they are associated with
A TRUE
10 Code developed outside the .NET Framework is called ________
B unmanage code
11 _______ attribute is used to invoke unmanage code in a C# program
D DllImport
12 Namespace ______ is mandatory for using DllImport attribute
C System.Runtime.InteropServices
13 Which attribute is used to notify about a deprecated element
B Obsolete
14 Conditional attribute is used as debugging aid or precompilation directive
A TRUE
15 Custom attributes also placed in the namespace System
A TRUE
16 Which statement is FALSE about custom attribute?
C A metadata cannot be extracted by another application
17 Sn.exe is used to create strong names for assemblies.
A TRUE
18 A .NET component is also referred to as assembly.
A TRUE----------------Cau nay dung
19 Adding pictures to resources of an assembly can be easily accomplished using the ___________ class of the .NET Base Class Library.
B ResourceData
21 The extension of an assembly is _________
B .dll
22 A key pair is created using the _______utility.
D key.snk
23 Private assemblies have no versioning policy.
B FALSE
24 The _____ package forms the basic unit of versioning.
A An Assembly ----------------Cau nay dung
25 The syntax to create an assembly file is:
B csc /out:<assembly name>/library <filename1 filename2..> ----------------Cau nay dung
26 For versioning the private assemblies, the CLR simply loads the newest assemblies found in the application directory.
A TRUE----------------Cau nay dung
27 Identify the correct syntax for creating an executable file referencing an assembly.
D csc /out:< executable name > /target:exe /r:<assembly name1;assemblyname2…;> <filename1 filename2..> ----------------Cau nay dung
28 Version number of an assembly are stored in the following format:
C <Major version>.< Minor version >.<Build Number>.<Revision>
29 The information about a class can be found out using ________
C Reflection
30 The manifest contains data that ___ (Choose 2)
C describes how the elements in assembly are related to each other.
D describes the other assemblies on which the elements of the assembly are dependent.
31 Which of the following commands can be used to create assembly named "myAssembly" from the files "file1.cs and file2.cs"?
B csc /out:myAssembly.dll /target:library file1.cs file2.cs
32 The global assemblies are saved in the _________
A in the <drive>:\WINNT\Assembly folder.
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.
34 The programmer has an assembly named pri.dll which other programmer also wants used the same assembly.
Which of the following are the correct statements when executed will satisfy the above needs.
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.
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.
B ILDASM ----------------Cau nay dung
37 Which one of the following statement/s with reference to Shared Assemblies is NOT TRUE?
A Shared assemblies are the default type of assemblies
38 When we use a __________ assembly, the assembly file is not copied onto the applications directory but remains in the GAC folder.
B Shared----------------Cau nay dung
39 What does a change in the build number of the version number indicate?
B It indicates that a very minor change has been made to the assembly ----------------Cau nay dung
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.
C Both the Statements are true ----------------Cau nay dung
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.
C Both the Statements are true ----------------Cau nay dung
42 The ________ Command Line Option is used to list assemblies from the GAC.
A /l ----------------Cau nay dung
43 What is the command GacUtil /i NetClient.dll used for ?
D 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.
C ILDASM.exe ----------------Cau nay dung
45 _________ describe the methods, types, IL and resource.
D Resource-Metadata----------------Cau nay dung
46 Which of the following is/are not a part of the Assembly?
E GAC utility ----------------Cau nay dung
47 Which part of the assembly displays the picture file or sound file ?
D Resources ----------------Cau nay dung
48 Which file comes with .Net framework SDK to create a Resource file ?
B Resgen.exe ----------------Cau nay dung
49 ResourceWriter class is present in the _________ namespace.
A System.Resources ----------------Cau nay dung
50 What is the purpose of the Exists method of System.IO.Directory class?
B It checks whether the given path refers to an existing directory ----------------Cau nay dung
51 Identify the syntax of the GetDirectories method of System.IO.Directory class.
A string[] GetDirectories(stringPath); ----------------Cau nay dung
52 The default mode in the FileStream class is ___________ read/write operations
A synchronous ----------------Cau nay dung
53 The StreamReader class is the superclass of the class TextReader?
A TRUE ----------------Cau nay dung
54 Stream class support a two-way stream (input and output)
A TRUE ----------------Cau nay dung
55 Which class is used to write primitive types to a stream
B BinaryWriter ----------------Cau nay dung
56 A stream to encrypt or zip data can be created
A TRUE ----------------Cau nay dung
57 Multithread can help to improve application responsiveness
A TRUE ----------------Cau nay dung
58 Which class in the System.Threading namespace is used to sunchronize access to objects?
C Monitor ----------------Cau nay dung
59 The Timer class in the System.Thread namespace provides a mechanism for executing a method at _______
A specified intervals ----------------Cau nay dung
60 ThreadStart is a _________
D delegate ----------------Cau nay dung
61 Which statement is true to create a thread
B Thread t = new Thread(new ThreadStart(CallbackMethodName));----------------Cau nay dung
62 Multithreading can be implemented in .NET by (choose 2)
A ThreadStart ----------------Cau nay dung
C ThreadPool class ----------------Cau nay dung
63 ______ is the main class for creating threads and controlling them
D Monitor ---------------Cau nay dung
64 ______ contains operationg system-specific objects that wait for access to shared resources
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
B ThreadPool ----------------Cau nay dung
66 The methods represented by ThreadStart can return any type
B FALSE ----------------Cau nay dung
67 The methods represented by ThreadStart can have zero, one or more parameters
B FALSE ----------------Cau nay dung
68 An instance of a class which defines the method containing task action needs to be created before starting a thread object
A TRUE ----------------Cau nay dung
69 The start method in the Thread class starts immediately the thread execution
B FALSE ----------------Cau nay dung
70 Only the Thread class can be used to create a thread object
A TRUE ----------------Cau nay dung
71 _______ method blocks the calling thread till the current thread ends
B Join() ----------------Cau nay dung
72 Which property returns a value that contains the state of the current thread.
A ThreadState ----------------Cau nay dung
73 Which statements are TRUE about thread?
B Priority level values come from the ThreadPriority enumeration of namespace System.Threading ----------------Cau nay dung
D 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 ______
B Critical section ----------------Cau nay dung
75 ________ is a mechanism to implement thread management
A Critical section
B Locking
C Immutable object
D Thread pooling ----------------Cau nay dung
76 ______ is a concept which allows only one thread to excusively access particular sections of code at a time
A Locking
B Thread pooling ----------------Cau nay dung
C Reentrant
77 Reentrant is __________
A a method which is thread-safe ----------------Cau nay dung
B a mechanism to implement thread management
C 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 dung
B .NET achieves COM interoperability by creating a proxy class for every COM component that the .NET client tries to access. ----------------Cau nay dung
C When a .NET component is called from COM, the runtime generates a Runtime Callable 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 .NET assembly.
A TlBExp
B TlbImp
C TlBLib ----------------Cau nay dung
D TlBDet
80 The TlbExp Utility creates the proxy for the COM Dlls.
A TRUE
B 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 the GAC.
A TRUE ----------------Cau nay dung
B FALSE
82 When an object of the COM component is created in a .NET managed environment; how is the object destroyed?
A The object is destroyed by the CLR
B The object is destroyed when the count reaches zero
C This issue is addressed by the RCW ----------------Cau nay dung
83 When a .NET component is called from COM, the runtime generates a wrapper object known as the __________________.
A Runtime Callable Wrapper
B COM Callable Wrapper ----------------Cau nay dung
84 Regardless of how many COM clients try to access the component, the runtime creates only one CCW for a managed .NET component.
A TRUE ----------------Cau nay dung
B FALSE
85 .NET client and COM clients can simultaneously make calls to the same .NET component.
A TRUE ----------------Cau nay dung
B FALSE
86 In order to call a .NET component from a COM client, you need to first register the assembly using the _________ utility.
A RegAsm ----------------Cau nay dung
B TlbExp
87 The Runtime Callable Wrapper does not contain any form of business logic.
A TRUE ----------------Cau nay dung
B FALSE
88 How many CCWs are created by the runtime to manage more then one COM client ?
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 dung
C 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 ?
A The CLR manages the lifetime of the objects in .Net. ----------------Cau nay dung
B .NET clients use interfaces to learn about the functionality of the object.
C .Net files can be either .dll or .pe files ----------------Cau nay dung
D .Net objects must reside in the same memory location throughout the lifetime of the object
90 The .exe file in .Net can be executed from any platform.
A TRUE ----------------Cau nay dung
B FALSE
91 What is a Runtime callable wrapper ?
A Run time error in .Net
B It is the proxy through which .Net interacts with the COM ----------------Cau nay dung
C An object used in .Net
D A component used in .Net
92 Which term is used for the data conversion from Com to .Net ?
A Marshalling
B Type-casting
C Data-conversion
D Marshaled ----------------Cau nay dung
93 What must one do to register or unregister the .Net components in the Windows registry ?
A Write the code for registering/unregistering .Net components in the assembly.
B Run RegAsm.exe on the command line ----------------Cau nay dung
C 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 dung
B Executable Callable Wrapper
C Route Callable Wrapper
95 The ___________ command gives you the output of COM type library.
A TlBExp ----------------Cau nay dung
B TlBImp
C TlBLib
D TlBDet
96 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 the second is the _________.
A EnvironmentPermission
B Encoding style ----------------Cau nay dung
C Version No.
D File path
97 The WriteStartDocument() method of the XmlTextwriter class writes the XML declaration with the version _________.
A "1.0" ----------------Cau nay dung
B "0.0"
C "0.1"
D "1.1"
E "2.0"
98 The XMLReader class is an abstract class.
A TRUE ----------------Cau nay dung
B 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 dung
D WriteStartElement()
100 Identify the correct statement/s.
Statement A: The WriteStartDocument() method of the XmlTextWriter class writes the specified start tag.
Statement B: The WriteStartElement() method of the XmlTextWriter class writes the specified specified XML declaration.
A Statement 1 is true
B Statement 2 is true
C Both the Statements are true
D Both the Statements are false----------------Cau nay dung
101 When there are no more nodes to be read in the file, the XMLReader class returns ________.
A 0
B 1 ----------------Cau nay dung
C FALSE
D EOF
102 Identify the correct statement/s.
Statement A: The XMLNodeList is an ordered list of nodes but the data represented by them is not live.
Statement B: The XMLNode and the XMLNodeList class collectively make up the core of the DOM implementation in .NET.
A Statement 1 is true
B Statement 2 is true ----------------Cau nay dung
C Both the Statements are true
D Both the Statements are false
103 The XmlValidatingReader is an implementation of the __________ class.
A XmlReader ----------------Cau nay dung
B XmlTextReader
C ReadString
D ValidatingXML
104 The Document Object Model is implemented in .NET using the _________ class.
A XMLNode ----------------Cau nay dung
B XMLNodeList
C 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 document
B XSLT is used to map more then one XML document ----------------Cau nay dung
C XSLT can be used with various languages ----------------Cau nay dung
106 The __________ method of the XMLTextWriter class writes the specified start tag.
A WriteStartElement() ----------------Cau nay dung
B WriteStartDocument()
C WriteStartTag()
D WriteStartAttribute()
107 XMLValidatingReader class provides the validation against:
A XDR schemas
B XML schemas
C DTDs schemas
D All of the above ----------------Cau nay dung
E None of the above
108 Which one of the following classes allows you to transform documents using stylesheets in XML?
A System.XML.Style
B System.XML.Xsl ----------------Cau nay dung
C System.XML.Schema
D System.XML.Xpath
109 ReadXML() and WriteXML() methods belong to the _________class.
A SqlConnection
B SqlDataAdapter
C Dataset ----------------Cau nay dung
D XmlTextWriter
110 All valid XML documents are well formed but not all well formed XML document are valid.
A TRUE ----------------Cau nay dung
B FALSE
111 Which of the following classes in System.XML namespace gives the tree representation of the XML document, so that we can navigate through the entire document and edit if required ?
A XmlReader
B XmlWriter----------------Cau nay dung
C XmlDocument
D XMLValidatingReader
112 The first parameter of XMLTextWriter specifies the filename which we have to create, whereas the second parameter specifies ___________.
A Path of the file
B Format of the file
C Encoding Style ----------------Cau nay dung
113 The class _____________ in System.XML is used to store, retrieve and manipulate the relational Dataset.
A XMLDataDocument ----------------Cau nay dung
B XMLTableDocument
C XMLRelationalDocument
114 Identify the 2 abstract classes from the list given below.
A XmlReader ----------------Cau nay dung
B XmlWriter ----------------Cau nay dung
C XmlDocument
D 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 dynamically invoke methods in an assembly. ----------------Cau nay dung
B 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 that the generated code can be executed directly. ----------------Cau nay dung
D The Reflection API uses the System.Reflection namespace, with the Reflection class 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 nay dung
B Translates a stream of input characters into a stream of input elements
C Obtains Member Information from a Class ----------------Cau nay dung
D Dynamically Invokes Methods from Classes in an Assembly ----------------Cau nay dung
118 Which of the following properties does the Type class have? (Choose 3)
A IsCLass
B IsMethod
C IsPublic ----------------Cau nay dung
D IsCOMObject----------------Cau nay dung
119 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 the same name but different version numbers. ----------------Cau nay dung
C Reflection APIs does not allow creating of assembly in memory dynamically.
D The Reflection API allows creating types on the fly and invoking methods on them. ----------------Cau nay dung
120 How can we create the object dynamically in C#?
A C# does not allow instantiation
of objects at run time.
B By using the System.Reflection.
CreateInstance() method to create
an 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 to
create an instance of object in the following manner.
Type myObjectType =Type.GetTypeFromProgID
("MyDll.MyOName")
object myObject = System.Activator.CreatInstance
(myObjectType)
----------------Cau nay dung
D In C#, Object cannot be instantiated
at run time but a method of a
class can be invoked.
121 using System.Reflection;
using System;
class Reflect
{
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 voidMain()
{
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 error
B The output of above code will be:
No of members : 11
No of fields: 4
C The output of above code will be:
No of members : 11
No of fields: 3
----------------Cau nay dung
D The output of above code will be:
No of members : 12
No of fields: 3
122 Through which process does the assembly expose its Metadata ?
C Reflection
Q.1)
This feature prevents multiple threads from simultaneously modifying the state of the resource , by including various classes and data types.
C.
Thread Synchronization
Q.2)
This feature is the mechanism of blocking a thread util some condition becomes true
C.
Thread Waiting (correct answer)
Q.3)
Synchronizes access to objects
A.
Monitor
Q.4)
Contains operating system-specific objects that wait for access to shared resources.
B.
WaitHandle
Q.5)
This retrieves a value which indicates whether a thread belongs to the managed thread pool.
C.
IsThreadPoolThread (your answer)
Q.6)
Retrieves the value of execution status of the current thread.
A.
IsAlive
Q.7)
Retrieves a value which contains the state of the current thread.
C.
IsAlive (correct answer)
Q.8)
Priority retrieves or specifies a value which indicates the scheduling priority of a thread.
A.
True (your answer)
Q.9)
This method blocks the calling thread till the thread ends.
C.
Join (your answer)
Q.10)
This method obstructs the current thread for the specified time.
B.
Sleep
Q.11)
A Thread must be in the Running state before the operating System can schedule it.
A.
True (correct answer)
Q.12)
The default priority of a thread is:
B.
Normal(your answer)
Q.13)
This is a language for retrieving information from a XML Document. is used to navigate through elements and attributes in an xml document.
B.
XPath (correct answer)
Q.14)
An XPath expression are returns: - 3 choices
A.
a node set
C.
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 element
2. add the element after the last child node.
3. write value to the element.
4. Declare the objects
5.Save the file.
D.
4-1-3-2-5 (correct answer)
Q.16)
This is an abstract class that provides a cursor model for navigating and editing XMl data.
D.
XPathNavigator (correct answer)
Q.17)
How to declare Attributes:
A.
[AttributeName(parameters)]
Element_Name(parameter){//Implementation}
Q.18)
This attribute can be used as debugging aid in the C# code.
B.
Conditional (correct answer)
Q.19)
Which statements are true? - 3 choices
B.
Attributes are a mechanism of adding metadata to a programming element (your answer)
C.
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.
C.
Unmanaged Code
Q.21)
Namespace is mandatory for using DLLImport attribute
B.
System.Runtime.InteropServices (correct answer)
Q.22)
Used to invoke unmanaged code in a C# program.
C.
DLLImport Attribute (correct answer)
Q.23)
Use as debugging aid in the C# code.
A.
Conditional Attribute (correct answer)
Q.24)
Namespace is mandatory for using the Conditional attribute
B.
System.Diagnostics (your answer)
Q.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.
True
Q.26)
This is a phrase for complications which arise when working with dynamic link libraries.
B.
DLL Hell
Q.27)
These are the building blocks used by the .Net Framework used to solve the versioning and deployment problems posed by the DLLs
A.
Assemblies
Q.28)
This is a collection of information required by the runtime to execute an application.
D.
Assembly (correct answer)
Q.29)
This is deployed with an application and is available only for the application.
B.
A private assembly (correct answer)
Q.30)
A assembly consists of parts:
- 3 choices
B.
Assembly Metadata
C.
Type Metadata
E.
MSIL Code & Resources
Q.31)
A namespace can contain one or more assemblies and an assembly can contain one or more namespaces.
A.
True (correct answer)
Q.32)
Which statements are true with assembly.- 3 choices
A.
Multiple applications can not implement the same DLL file due to versioning problem
B.
DLLs use fewer resource (your answer)
D.
Applications must be self describing so that they are no longer dependent of the registry entries. (your answer)
Q.33)
Collection of information existing in binary form in a Portable Executable file or a .Net assembly.
B.
Assembly metadata (correct answer)
Q.34)
File such as JPEG, text, XML and other types that are used in the application.
B.
Resource (your answer)
Q.35)
Data present in the assembly and its type.
B.
Type Metadata (correct answer)
Q.36)
Compilers convert the source code into an intermediate language.
B.
MSIL Code
Q.37)
The System.IO namespace in .Net does not support stream handling.
B.
False (your answer)
Q.38)
The class named File is a member of System.IO namespace.
A.
True (your answer)
Q.39)
This class reads primary data types as binary values in a specific encoding.
B.
BinaryReader
Q.40)
This class provides methods for creating, moving and enumerating through directories and sub-directories.
B.
Directory
Q.41)
This class provides instance methods for creating, moving and enumerating directories and sub-directories.
A.
DirectoryInfor
Q.42)
This class provides static methods for creating and manipulating files.
B.
File
Q.43)
This class contains methods that are common to file and directory manipulation.
B.
FileSystemInfor (correct answer)
Q.44)
The TextReader class represents a reader that can read a sequence of characters.
A.
True
Q.45)
This class is used to read and write data to memory instead of a disk.
B.
MemoryStream
Q.46)
This class is not part of the system.IO namsepace, It resides within the System.security.
B.
CryptoStream
Q.47)
These classes are not part of the System.IO namspace.
A.
NetWorkStream (your answer)
B.
CryptoStream (your answer)
Q.48)
This class can be used for operations such as creating, copying, moving, deleting and appending to files.
B.
FileInfor (correct answer)
Q.49)
The FileInfor class is used to create FileStream Object.
A.
True (your answer)
Q.50)
In Directory class, this method returns a DirectoryInfor object which can be used to work with the newly created directory.
C.
CreateDirectory()
Q.51)
This method of Directory class is also used to rename the directory.
B.
Move();
Q.52)
Get the names of sub-directories in a specified directory.
A.
GetDirectories
Q.53)
Returns current working directory of the application.
B.
GetCurrentDirectory
Q.54)
Which the terms do they belong to Directoryinfo class?
- 3 choices
A.
FullName
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 class
4. Create one or more objects of the class in the new class
5.Create one or more Thread objects in the new class
6. Start the execution of the thread.
D.
3-1-4-5-6 (correct answer)
Q.56)
Only the Thread class can be used to create a thread object.
B.
False
Q.57)
A portion of thread which is accessed by multiple threads at the same time.
C.
Critical Section (correct answer)
Q.58)
This object that does not change its state after it is create.
B.
Immutable object (correct answer)
Q.59)
This method which id thread - safe
C.
Reentrant (correct answer)
Q.60)
Which statements are true?
B.
COM permits reuse of code across different environments.
C.
GUID is referred when COM or DCOM object is registered
E.
COM uses com-capable tool during the implementation of each subsystem.
Q.61)
This performs operations like joins, ordering and sorting
C.
XQuery (correct answer)
Q.62)
Which statements are true?
B.
XMLDocument class enables navigation and editing (your answer)
Q.63)
A standard that helps in processing xml
B.
System.Xml namespace (correct answer)
Q.64)
A class that has the ability to accept or reject changes in the document.
B.
APathDocument (correct answer)
Q.65)
XmlTextWriter is a class that is derived from XmlWriter
A.
True (correct answer)
Q.66)
WriteString() method flushes the buffer and writes whatever data is left in the buffer to the stream.
B.
False
Q.67)
Read the next node from the stream.
A.
B.
Read method (your answer)
Q.68)
Rises when a validation error occurs
A.
ValidationEventHandle (your answer)
Q.69)
Child operator ; selects immediate children of the left-site collection
A.
B.
/ (correct answer)
C.
..
D.
*
Q.70)
Recursive descent ; searches for the specified element at any depth
A.
// (correct answer)
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.
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.
2. ____ is the main class for creating threads and controlling them
A. WaitHandle
B. Thread
3. The methods represented by ThreadStart can return any type
A. False
4. The . Net Frameword SDK 2 provides the user with a tool called ____ to peek into the assemblies and explore the classes available within them.
A. ILDASM
5. The methods represented by ThreadStart can have zero, one or more parameters
A. Fasle
6. In C#, _______ is a mechanism of adding metadata to a programming element.
A. Attribute
7. Sn.exe is used to create strong names for essemblies
A. 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 on the GAC
9. Which file comes with .NET frameword SDK to create a Resource file?
A. Resgen.exe
B. TLBImp
10. Multithread can help to improve application responsiveness
A. True
11. Identify the correct statement/s
A. Sta
12. Identify the 2 abstract classes from the list given below
A. XmlReader
B. XmlWriter
13. Which of the following statement/s with reference to Dllimport attribute is/are TRUE?
A. It can import a file written in any programming language
14. What must one do to register or unregister the .Net components in the Windows registry?
A. Run RegAsm.exe on the command line.
15. We can define a custom attribute but its information cannot be retrieved
A. Fasle
16. The glable assemblies are saved in the ____
A. In the <dirve>:\WINNT\Assembly folder
17. The .exe file in .Net can be executed from any platform
A. False
18. A .Net component is also referred to as assembly
A. True
19. fdf
20. The ___ utility can be used to convert a COM Type Library into a .Net assembly
A. TLBExp
21. The TLBExp Utility creates the proxy for the COM Dlls
A. False
22. ReadXML() and WriteXML() methods belong to the ____class
A. Dataset
B. Thread t = new Thread(new ThreadStart(CallbackMethodName));
23. which class in the System.Thread namespace is used to synchronize access to objects?
A. Monitor
24. Only the Thread class can be used to create a thread object
A. True
25. the start method in the Thread class stats immediately the thread execution
A. true
26. which of the following is/are not a part of the Assembly?
A. GAC utility
27. Descriptive information in the metadata can be extracted using runtime reflection services
A. True
28. 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 the second is the ____
A. File path
29. Which class will point you towards the innerdata of the XML document?
A. XMLNode
30. identify the sytax of the GetDirectories method of System.IO.Directory class/
A. string[] GetDirectories(stringPath);
31. Attibutes are stored with the metadata of the element they are associated with
A. true
32. which statement is FALSE about custom attribute?
A. A metadata cannot be extracted by another application
33. The StreamReader class is the superClass of the class TextReader?
A. False
34. which of the following properties does the Type class have? (Choose 3)
A. IsCOMObject
B. IsClass
C. IsPublic
D.
35. Which term is used for the data conversion from Com to .Net?
A.
B. Marshalling
36. _____ is a concept which allows only one thread to excusively access particular sections of code at a time
A. Locking
37. what is the purpose if the Eixsts method of System.IO.Directory class?
A. It checks whether the given path refers to an existing directory
B.
38. ___ is a mechanism to implement thread management
A. Thread pooling
39. Version number of an assembly are stored in the follwing format
A. <>
40. The extension of an assembly is ______
A. .dll
41. Which part of the assembly displays the picture file or sound file?
A. Resources
42. Namespace ___ is mandatory foor using DllImport attribute
A. Systen.Runtime.InteropServices
43. A key pair is created using the ______ utility
A. Sn.exe
44. For versioning the private assemblies, the CLR simply loads the newst assemblies found in the application directory
A.
B. True
45. in order to call a .Net component from a COM client, you need to first register the assembly using the ____ utility
A. RegAsm
46. A portion of code which is accessed by multiple threads at the same time is called ___
A. Critical section
47. The information about a class can be found out using ___
A. Reflection
48. ______ is the Proxy used by .Net to interact with COM.
A. Runtime Callable Wrapper
49. When an object of the COM component is created in a .Net managed environment; how is the object destroyed?
A. This issue is addressed by the RCW
50. Which of the following statements are true? (Choose 2)
A. Assemblies can be shared by installing it in the global Assembly Cache
B. Private assembies have predefined version policy
51. The ____ attribute enumerator is applied for any class elements
A. AttributeTargets.Class
52. XMLValidatingReader class provides the validation against:
A. All of the above
6. In C#,_______ is a mechanism of adding metadata to a programming element.
b. Attribute
7. Sn.exe is used to create strong names for assemblies.
b. true
9. Which file comes with .Net framework SDK to create a Resource file?
d. Resgen.exe
11. The _______ command gives you the output of COM type library.
d. TlBImp
12. Multithread can help to improve application responsiveness
b. true
31. Which class in the System.Threading namespace is used to synchronize access to object?
c. Monitor
34. The start method in the Thread class starts immediately the thread execution
b. true
41. Attribute are stored with the metadata of element they are associated with
b. true
42. Which statement is FALSE about custom attribute?
a. A metadata cannot be extracted by another application
44. The StreamReader class is the superclass of the class TextReader?
a. false
Bạn đang đọc truyện trên: Truyen2U.Pro