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...
Which two actions should you perform?
You are developing an application that includes the following code segment. (Line numbers are included for reference only.) The GetAnimals() method must meet the following requirements: • Connect to a Microsoft SQL Server database. • Create Animal objects and populate them with data from the database. • Return a sequence...
What should you do?
You are debugging an application that calculates loan interest. The application includes the following code. (Line numbers are included for reference only.) You need to ensure that the debugger breaks execution within the CalculateInterest() method when the loanAmount variable is less than or equal to zero in all builds of...
Which code segment should you use?
You are creating an application that manages information about zoo animals. The application includes a class named Animal and a method named Save. The Save() method must be strongly typed. It must allow only types inherited from the Animal class that uses a constructor that accepts no parameters. You need...
Which two assembly attributes should you include in the source code?
You are developing an application by using C#. You provide a public key to the development team during development. You need to specify that the assembly is not fully signed when it is built. Which two assembly attributes should you include in the source code? (Each correct answer presents part...
Which code segment should you use?
You are developing an application that accepts the input of dates from the user. Users enter the date in their local format. The date entered by the user is stored in a string variable named inputDate. The valid date value must be placed in a DateTime variable named validatedDate. You...
Which code segment should you insert at line 07?
You are developing an application by using C#. The application includes the following code segment. (Line numbers are included for reference only.) The DoWork() method must not throw any exceptions when converting the obj object to the IDataContainer interface or when accessing the Data property. You need to meet the...
Which code segment should you use?
You are developing an application that uses structured exception handling. The application includes a class named ExceptionLogger. The ExceptionLogger class implements a method named LogException by using the following code segment: public static void LogException(Exception ex) You have the following requirements: • Log all exceptions by using the LogException() method...
Which garbage collector method should you use?
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?A . ReRegisterForFinalize()B . SuppressFinalize()C . Collect()D...
Which code segment should you insert at line 04?
You are developing a C# application that has a requirement to validate some string input data by using the Regex class. The application includes a method named ContainsHyperlink. The ContainsHyperlink() method will verify the presence of a URI and surrounding markup. The following code segment defines the ContainsHyperlink() method. (Line...