MB6-894 · Question #18
You are an Independent Software Vendor (ISV) developer, and you are reviewing the code in a solution. During the code review, you see the following: using (var sr = new…
Sign in or unlock MB6-894 to reveal the answer and full explanation for question #18. The question stem and answer options stay visible for context.
Question
You are an Independent Software Vendor (ISV) developer, and you are reviewing the code in a solution. During the code review, you see the following:
using (var sr = new System.IO.StreamReader(_inputFilename)) { var textFromFile = sr.ReadToEnd(); this.processFileDate(textFromFile); } Which two statements about the sr and textFromFile variables are true? Each correct answer presents a complete solution.
Options
- AThe variables storing .Net Framework objects have to be declared using the var keyword.
- BThe var keyword indicates the variables can store values of any type.
- CThe variables are valid within the block of code in which they were declared.
- DThe var keyword infers the type of the variables from their initialization expression.
Unlock MB6-894 to see the answer
You've previewed enough free MB6-894 questions. Unlock MB6-894 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.