READ Free Dumps For Microsoft- 70-483
Question ID 17054 | You are developing an application by using C#.
The application includes an object that performs a long running process.
You need to ensure that the garbage collector does not release the object's resources until
the process completes.
Which garbage collector method should you use?
|
Option A | WaitForFullGCComplete()
|
Option B | WaitForFullGCApproach()
|
Option C | KeepAlive()
|
Option D | WaitForPendingFinalizers()
|
Correct Answer | C |
Explanation Explanation: The GC.KeepAlive method references the specified object, which makes it ineligible for garbage collection from the start of the current routine to the point where this method is called. The purpose of the KeepAlive method is to ensure the existence of a reference to an object that is at risk of being prematurely reclaimed by the garbage collector. The KeepAlive method performs no operation and produces no side effects other than extending the lifetime of the object passed in as a parameter.
Question ID 17055 | You have the following code (line numbers are included for reference only):
You need to identify the missing line of code at line 15. Which line of code should you
identify?
|
Option A | using (fooSqlConn.BeginTransaction())
|
Option B | while (fooSqlReader.Read())
|
Option C | while (fooSqlReader.NextResult())
|
Option D | while (fooSqlReader.GetBoolean(0))
|
Correct Answer | B |
Explanation