Microsoft
70-515 · Question #6
70-515 Question #6: Real Exam Question with Answer & Explanation
Sign in or unlock 70-515 to reveal the answer and full explanation for question #6. The question stem and answer options stay visible for context.
Question
You are implementing an ASP.NET application that includes the following requirements. Retrieve the number of active bugs from the cache, if the number is present. If the number is not found in the cache, call a method named GetActiveBugs, and save the result under the ActiveBugs cache key. Ensure that cached data expires after 30 seconds. You need to add code to fulfill the requirements. Which code segment should you add?
Options
- Aint? numOfActiveBugs = (int?)Cache["ActiveBugs"];
- Bint numOfActiveBugs = (int) Cache.Get("ActiveBugs");
- Cint numOfActiveBugs = 0;
- Dint numOfActiveBugs = (int?)Cache["ActiveBugs"];
Unlock 70-515 to see the answer
You've previewed enough free 70-515 questions. Unlock 70-515 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.