Thứ Tư, 21 tháng 8, 2013

C#

1.  C# programming language provides the users with an altogether separate namespace called ..... for file and stream handling.

A.     System.IO

 2.Which of the following classes enables you to add image files and other types of resource files an assembly ?

A.     Resource

3. The....class in the System.IO namespace contains methods that are common to file and directory manipulation?
  1. FileSystemInFo
4. The MemoryStream class is derived from .... class

A.     Stream

 5. The C# …………... attribute allows you to control whether a method should be called.

A.     conditional

 6. The .... class provides static methods for the creation, copying ,deletion , moving and opening of files .

A.     File

 7. A ..... object can be requested by both ,the COM and .NET clients, at the same time.

A.     managed

8. ...... is used only to generate and register a type library with COM.

A.     Regasm.exe

9. The ..... method of File class is used when you want to delete a file .

A.     Delete() with the path of the file specifiled as a parameter

10. Which of the following statement is not an Assembly property ?

A.     Assemblies are always loaded in the computer memory

11. Can you identify the correct order of steps to use components directly from .NET ?
    1. Select the component from the list
    2. Click the COM tab in the Add Reference dialog box
    3. Add a reference to the project using Project ' Add Reference .
    4. Click OK to create RCWs for the selected type library object .
A.     3 2 1 4
12. The ..... class presents an attribute and its values in the DTD while the ..... class defines a reader that provides forward-only access to XML data.

A.     XmlAttribute ,XmlReader

13. Which of the following statements about private assemblies are valid ?
  1. Private assemblies can be deployed using XCOPY or using drag and drop in Windows.

B.     A private assembly is deployed in an application for exlusive use in that application

  1. Private assemblies need not be registered .
14. Which of the following operations can be performed by using the DirectoryInfo?

A.     Create , move, and delete directories

15. An ..... is a collection of information required by the runtime to execute an application.

A.     assembly

16. Can you identify the correct order of steps to create a thread ?
    1. Define a class
    2. Create one or more Thread objects in the new class
    3. Define a method inside the class
    4. Create one or more objects of the class in the new class
    5. Start the execution of the threads

A.     1 3 4 2 5

17. If a part of code is accessed by multiple threads at the same time it is known as a ..... section.

A.     critical

18. The ..... property of Thread class defines the state of a thread during its execution.

A.     ThreadState

19. The .... is a 128-bit number referred when COM or DCOM object is registered within the window registry
  1. GUID
20. Can you rearrange the steps to simulate process the compiler users to determine how to apply the attribute ?
    1. Checks for a named parameter
    2. Sets the field or property to a named parameter value
    3. Searches for the attribute class
    4. Checks for a constructor in the attribute
    5. Creates an instance of the object
    6. Checks the scope of the attribute
    7. Saves the current state of the attribute class

A.     3 6 4 5 1 2 7

21. Can you identify the correct order of steps to create a resource file ?
1.                                                      Move to the drive on the system where the .txt file is present
2.                                                      Type Resgen filename.txt
3.                                                      Open Visual Studio 2005 Command Prompt
4.                                                      Create a text file with required data and save it in the local system.

A.     4 3 1 2

22. Can you identify the correct order of stpes to call a function exported directly from a DLL?

1.      Add the DllImport attribute to the method
2.      Specify the information and return value needed for the custom marshling of the method's parameters.
3.      Specify the name of the DLL that contains the method
4.      Declare a static and extern method.

A.     4 1 3 2

23. ...... is a phrase for complications that arise when working with dynamic link libraries.

A.     DLL Hell

24. A newly created thread originates from the ..... state and remains in that state until the .... method is invoked.

A.     Unstarted, Start

 25. Can you identify the two ways by which managed code can directly call unmanaged code ?
  1. Call a function exported directly from a DLL.

B.     Call an interface method on a COM object

26. Which of the following statements about System.IO namespace classes are incorrect ?

A.     The File class contains methods that are common to file and directory manipulation

  1. The Steam represents a writer that can write a sequence of characters.
27. The two important methods in MemberInfo class are ........
  1. GetCustomAttributes() and GetType()
28. ...... is the tool using which assemblies can be deployed, uninstall ,manipulated and viewed.

A.     gacutil.exe

29. Which of the following correctly represents the four parts contained in an assembly ?

A.     Assembly Metadata ,Type Metadata, MSIL Code and Resources

30. ....... allow you to place extra descriptive information into metadata        

A.     Attributes

31. Which of the following statements about thread pooling in .NET are true ?
  1. The ThreadPool class helps to provide a ready set of worker threads in a pool from which one or more can be chosen for any short task.
  2. Using the ThreadPool class ,thread management is done by the system.
32. Which among the following is the correct .NET namespace that provide transforming XML ?

A.     System.Xml.Xsl

33. Which of these namespaces must be imported in order to work with DLLImport attribute ?

A.     System.Runtime.InteropServices

34. Which of the following statements about methods of File class are correct?
  1. The Create method is used to create a file in the specified path.
  2. The delete method is used to delete a file from a specified path
  3. The GetAttribute method is used to get the file attribute of the file
35. Can you identify the correct order of steps followed when Pinvoke calls an unmanaged function?
1.      The address of the function is located
2.      The function arguments are pushed onto the stack
3.      The DLL containing the function is located
4.      The DLL is loaded into the memory

A.     3 4 1 2

36. The ......... attribute is used to describe how an attribute class can be used.

A.     AttributeUsage

37. Which of the following is not a valid member of the Thread Priority enumeration?

A.     Medium

38. The C# ...... attribute allows you to invoke unmanaged code in a C# program.

A.     DLLImport

39. ....... can be implied simply as a collection of information existing in binary form in a Portable Executable file or a .NET assembly.

A.     Type Metadata

40. Can you identify the correct order of steps to create a multiple assembly using .NET?
    1. Create a source code
    2. Save and compile the source code into .net modules
    3. Use csc to assemble the modules and main source file into a single assembly
    4. Create a main source file
A.     1 4 3 2
41. The process of retrieving information that is held in metadata using .NET runtime is called....……..

A.     Reflection

42. Which of the following statements about Pinvoke are valid ?
  1. Unmanaged DLL information are made available to managed client code with the help of Pinvoke.
  2. Pinvoke can access global exported DLL functions.

C.     Pinvoke provides support to marshal CLR data types and native data types

43. Can you identify the correct order of steps to write an XML file using ....
    1. Write the XML declaration
    2. Add the Start and End elements
    3. Declare an XmlTextWriter object
    4. Write the value of the element
    5. close the file
    6. Flush the file

A.     3 1 2 4 6 5

44. Which of the following statements is not a restriction for declaring condition methods ?

  1. This method must be an implementation of an interface method.

Không có nhận xét nào:

Đăng nhận xét