ProProfs Quiz Maker

Microsoft 70-536 Exam Practice Questions: Technology Specialist

42 Questions  I  5007 Attempts  I  Created By muskad202 2404 days ago
Microsoft Technology Specialist (TS) 70-536 Exam Practice questions. The Microsoft .NET Framework 2.Application Development Foundation exam became available March 1, 2006. You can try these as a timed practice exam. The pass percentage is set to 75% for this set of practice questions.

  


Question Excerpt From Microsoft 70-536 Exam Practice Questions: Technology Specialist
Q.1)  You are developing a .NET assembly which will be used from both, .NET components and COM components. How would you notify the caller that incorrect arguments were passed to a method?
A.
B.
C.
D.
Q.2)  You are developing a .NET assembly which will be used from both, .NET components and COM components. Which 3 utilities do you need to use to ensure that COM components can access your assembly as easily as possible?
A.
B.
C.
D.
E.
Q.3)  You have created a custom event log using EventLog.CreateEventSource(�A1�, �A2�); How would you write entries to this log?
A.
B.
C.
D.
Q.4)  When you attempt to run an assembly, you receive a security exception. You realize that the assembly does not have sufficient permissions required for running. Which tool can you use to modify the assembly�s permissions?
A.
B.
C.
D.
Q.5)  What could would you use to serialize an object �obj� and write it to a stream �outstream� using binary serialization?
A.
B.
C.
D.
Q.6)  Your application has a number of debug messages which you write using Debug.WriteLine(). How would you display all these messages on the command line?
A.
B.
C.
D.
Q.7)  You have a custom object �MyCustomObject� which you store in a list. You now want to enable a user to sort this list (containing instances of �MyCustomObject�). However, on reading the documentation, you determine that in order to support sorting in a list, your object needs to implement a particular interface. What interface do you need to implement?
A.
B.
C.
D.
Q.8)  You create an application that uses an assembly a.dll. You distribute a.dll along with your application. The application uses version 1.0.0.0. After some months, you release a newer version of a.dll with version 1.5.0.0. You need to make sure that the already deployed applications seamlessly switch to the newer dll version. What element will you add in the app.config file?
A.
B.
C.
D.
Q.9)  You have a function which should only be used by users who are part of the �FavouriteUsers� group. You want to implement role-based security within the application. Which code snippet should you use?
A.
B.
C.
D.
Q.10)  You are creating a custom installer for your application. To your application, you add a custom class that derives from the �Installer� class, and you override the Install, Commit, Rollback and Uninstall functions in that class. What else do you need to do?
Q.11)  You want to copy a file from one location to another. You create two FileInfo objects � �src� and �dst� for this purpose which represent the source location and the destination location. You want to copy all the permissions which the original file has to the destination file. You also want to ensure that the destination file does not inherit the permissions of the destination directory in which it is placed. What code would you use?
A.
B.
C.
D.
Q.12)  You develop a library, and want to ensure that the functions in the library cannot be either directly or indirectly invoked by applications that are not running on the local intranet. What attribute would you add to each method?
A.
B.
C.
D.
Q.13)  How can you retrieve a reference to the current application domain?
A.
B.
C.
D.
Q.14)  You want to obtain a hash value for some data stored in a byte array, in order to detect if there is corruption of the data. You use a HashAlgorithm object. Which code would you use to generate the hash?
A.
B.
C.
D.
Q.15)  You work in a company, and need to send an email to a user, and a copy of that email to your manager. Which code should you use?
A.
B.
C.
D.
Q.16)  For the employees in a company, you need to store their salaries. Given an employee name, you want to find the salary as efficiently as possible. Currently there are only 4 employees in the company, but you expect that number to go up to 100 by the year end. Which object should you use?
A.
B.
C.
D.
Q.17)  You create an Employee object as such: [Serializable] public class Employee { public string Name; private long Salary; } When the employee object is serialized, you do not want the Salary field to be persisted. What is the easiest way to do this?
A.
B.
C.
D.
Q.18)  You write a function that calculates the square root of numbers. The number passed in as a parameter must be greater than or equal to 0. If the number is less than 0, then in your debug build, you want to display a message box to the user. What code would do this in the best possible way?
A.
B.
C.
D.
Q.19)  Which methods of the FileStream class affect the Position property?
A.
B.
C.
D.
E.
Q.20)  You want to add a key-value pair to a HashTable �table�. However, you need to make sure that the key doesn�t already exist in the HashTable. What code could you use?
A.
B.
C.
D.
Q.21)  You have the following variables: Int64 i64; Int32 i32; Double d; Float F; Which of the following conversions requires an explicit cast?
Q.22)  What are the restrictions imposed on the signature of a method that is called when a serialization event occurs?
A.
B.
C.
D.
Q.23)  You need to compress a Stream �sourceFile� and store the compressed bytes in another Stream �destFile�. You also want to enable Cyclic Redundancy Checks in the compressed stream. What code would you use?
A.
B.
C.
D.
Q.24)  How would you send an HTML email message using MailMessage and SmtpClient?
A.
B.
C.
D.
Q.25)  You want to encrypt the network communication while sending an email to an smtp server. Which code should you use?
A.
B.
C.
D.
Q.26)  If a class implements ISerializable, it needs to provide a constructor that takes two parameters. What are the types of those parameters?
A.
B.
C.
D.
Q.27)  Which code should you use to create a class that represents a Windows Service?
A.
B.
C.
D.
Q.28)  You have a number of statements in your code that write lines to a Trace file. You use code as such: BooleanSwitch myTrace = new BooleanSwitch("MyTrace", "Used For Tracing"); Trace.WriteLineIf(myTrace.Enabled, "Test Trace Statement"); You want to toggle tracing on and off without having to recompile your application. What should you do?
A.
B.
C.
D.
Q.29)  You want to implement role based security in your application. The group and user data and account information is stored in a database. You want your application to restrict/allow access to code based on the user�s group membership. You want to write your application with the least amount of effort. What should you do?
A.
B.
C.
D.
E.
Q.30)  Within your application, you need to monitor and control a service installed on the local machine. Which class do you need to use?
A.
B.
C.
D.
E.
Q.31)  You want to display the names of all currently running processes. What could can you use?
A.
B.
C.
D.
Q.32)  You�ve created a function named �MyFunction� which you want to be called every 10 minutes. You decide to use the Timer class. You write another function called �StartTimer� which you will use to start the Timer. Also, when �StartTimer� is called, you want �MyFunction� to be called the moment the timer is started. What code would you use?
A.
B.
C.
D.
Q.33)  You want to use IsolatedStorage to store user settings for your application. What could would you use?
A.
B.
C.
D.
Q.34)  You want to use the Rijndael encryption method for encrypting an input file and storing the encrypted data in an output file. What code would you use?
A.
B.
C.
D.
Q.35)  You want to use the RSA algorithm to encrypt a string �messageString� and obtain the encrypted bytes. What code would you use?
A.
B.
C.
D.
Q.36)  What code would you use (using Management Objects) to retrieve a list of logical drives on a machine?
A.
B.
C.
D.
Q.37)  What method would you call on an object of type DirectoryInfo to retrieve a list of all subdirectories under that directory?
A.
B.
C.
D.
Q.38)  While writing a file using StreamWriter, how would you specify the encoding to use?
A.
B.
C.
D.
Q.39)  You are implementing a data structure, where in you want to store keys which are strings, and you want to store values associated with the keys, which are also strings. There can be multiple values associated with a key. What class would you use to minimize the development effort, while at the same time maximizing efficiency?
A.
B.
C.
D.
Q.40)  In order to use the foreach statement, what interface needs to be implemented by the target class?
A.
B.
C.
D.
Q.41)  Which interface should you implement in order to allow instances of your class to be converted to an instance of another type?
A.
B.
C.
D.
Q.42)  What class would you use in order to create a Font from a string that contains the font definition?
A.
B.
C.
D.

Take this quiz by clicking Start button on top.

Quiz Comments (8)
AAA
I believe the answer to this question is wrong: You develop a library, and want to ensure that the functions in the library cannot be either directly or indirectly invoked by applications that are not running on the local intranet. What attribute would you add to each method? The explanation given is this: LinkDemand should be used � it ensures that all callers in the call stack have the necessary permission � in this case it ensures that all callers in the call stack are on the local intranet. This is incorrect, it is SecurityAction.Demand that chacks all callers in the call stack, SecurityAction.LinkDemand only checks the immediate caller.
Gud quiz
a.rocco, you are correct that question/answer is incorrect.
Is the following correct: Your application has a number of debug messages which you write using Debug.WriteLine(). How would you display all these messages on the command line? A. Debug.Listeners.Add(new TextWriterTraceListener(Console.Out)); (your answer) B. Debug.Listeners.Add(new StreamWriter(Console.Out)); C. Debug.Listeners.Add(new ConsoleTraceListener(Console.Out)); (correct answer) D. Debug.Listeners.Add(new StreamWriterTraceListener(Console.Out)); Explanation TextWriterTraceListener is less efficient than ConsoleTraceListener. You cannot add a stream object to the Listeners collection, hence you cannot use StreamWriter. There is no object named StreamWriterTraceListener. -------------------------------------------- If seems that there is no overloaded constructor for ConsoleTraceListener that accepts a Stream object. This is available is the base class.
Yet another incorrect answer... How can you retrieve a reference to the current application domain? A. AppDomain ad = AppDomain.Current; (your answer) B. AppDomain ad = Thread.GetDomain(); (correct answer) C. AppDomain ad = Thread.CurrentThread.CurrentDomain; D. AppDomain ad = AppDomain.GetCurrentDomain(); ---------------------------------- I think the CurrentDomain should be the answer.
actuall both A and B seems correct for the Domain question.
you can get the reference of the current application domain using the Thread.GetDomain() and AppDomain.CurrentDomain, this is a tricky question

Please login to post comments.
After login, we will forward you back to this quiz.

Upgrade and get a lot more done!
Upgrade

 Adding Media is not included in your current plan

Upgrade and get a lot more:
  • Upload documents


  • Upload Videos


  • Upload Powerpoints


  • Add training/teaching material



Upgrade