How should you complete the code?

DRAG DROP
You are developing a function that takes a parameter named aParam as a string input.
You need to convert aParam to a Double. If the conversion cannot be completed, the function should return 0.


How should you complete the code? To answer, drag the appropriate code elements to the correct targets in the answer area. Each code element may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
Select and Place:


microsoft-exams

One thought on “How should you complete the code?

  1. public double convertTheDouble(string aParam)
    {
    double result;
    if (!double.TryParse(aParam, out result))
    return 0;
    return result;
    }

Leave a Reply

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


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