Which code segment should you add at line 19?

You are developing an application that includes the following code segment. (Line numbers are included for reference only.)


You need to ensure that the application accepts only integer input and prompts the user each time non-integer input is entered. Which code segment should you add at line 19?
A. If (!int.TryParse(sLine, out number))
B. If ((number = Int32.Parse(sLine)) == Single.NaN)
C. If ((number = int.Parse(sLine)) > Int32.MaxValue)
D. If (Int32.TryParse(sLine, out number))

microsoft-exams

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.