Which code should you insert at line 03?

You are creating a console application named App1.
App1 will validate user input for order entries.
You are developing the following code segment (line numbers are included for reference only):

You need to complete the code segment.
The solution must ensure that prices are positive and have two decimal places.
Which code should you insert at line 03?

You are creating a console application named App1.
App1 will validate user input for order entries.
You are developing the following code segment (line numbers are included for reference only):

You need to complete the code segment.
The solution must ensure that prices are positive and have two decimal places.
Which code should you insert at line 03?

A.
Option A

B.
Option B

C.
Option C

D.
Option D

Explanation:
* Regex.IsMatch Method (String, String)
Indicates whether the specified regular expression finds a match in the specified input string.
Syntax:
public static bool IsMatch(
string input,
string pattern
)



Leave a Reply 5

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


Xabi

Xabi

C is correct, the other allow the “-” character at start

JOSE ANTONIO

JOSE ANTONIO

WTF

C IS CORRECT

Twórca C#

Twórca C#

C jak Ciasto

SafeHub

SafeHub

None of them match price. all wrong

Lord Vader

Lord Vader

definitely C. others allow – at the start.

+ sign means digits must appear at least once
? means the stuff in the parentheiss can appear 0 or 1 times