You are developing an application for a client residing in Hong Kong. You need to display negative currency values by using a minus sign. Which code segment should you use?

You are developing an application for a client residing in Hong Kong.
You need to display negative currency values by using a minus sign. Which code segment should
you use?

A. Dim objCulture As NumberFormatInfo = _
    New CultureInfo("zh-HK").NumberFormatobjCulture.NumberNegativePattern = 1
    Return NumberToPrint.ToString("C", objCulture)
B. Dim objCulture As NumberFormatInfo = _
    New CultureInfo("zh-HK").NumberFormatobjCulture.CurrencyNegativePattern =
    1Return NumberToPrint.ToString("C", objCulture) 
C. Dim objCulture As NumberFormatInfo = _
    New CultureInfo("zh-HK").NumberFormatReturn NumberToPrint.ToString("-{0}",
    objCulture)
D. Dim objCulture As NumberFormatInfo = _
    New CultureInfo("zh-HK").NumberFormatReturn NumberToPrint.ToString("()",
    objCulture)

Answer: B


 

No comments:

Post a Comment