You are developing a fiscal report for a customer. Your customer has a main office in the United
States and a satellite office in Mexico.
You need to ensure that when users in the satellite office generate the report, the current date is
displayed in Mexican Spanish format. Which code segment should you use?
A. CultureInfo^ culture = gcnew CultureInfo(“es-MX”, false);DateTimeFormatInfo^ dtfi = culture-
>DateTimeFormat;DateTime^ dt = gcnew DateTime(DateTime::Today::Year,
DateTime::Today::Month, DateTime::Today::Day);String^ dateString = dt->ToString(dtfi-
>LongDatePattern);
B. Calendar^ cal = gcnew CultureInfo(“es-MX”, false)::Calendar; DateTime^dt = gcnew
DateTime(DateTime::Today::Year, DateTime::Today::Month, DateTime::Today::Day);
String^dateString = dt-> ToString();
C. String^ dateString =
DateTimeFormatInfo::CurrentInfo::GetMonthName(DateTime::Today::Month);
D. String^ dateString = DateTime::Today::Month::ToString(“es-MX”);
Answer: A
States and a satellite office in Mexico.
You need to ensure that when users in the satellite office generate the report, the current date is
displayed in Mexican Spanish format. Which code segment should you use?
A. CultureInfo^ culture = gcnew CultureInfo(“es-MX”, false);DateTimeFormatInfo^ dtfi = culture-
>DateTimeFormat;DateTime^ dt = gcnew DateTime(DateTime::Today::Year,
DateTime::Today::Month, DateTime::Today::Day);String^ dateString = dt->ToString(dtfi-
>LongDatePattern);
B. Calendar^ cal = gcnew CultureInfo(“es-MX”, false)::Calendar; DateTime^dt = gcnew
DateTime(DateTime::Today::Year, DateTime::Today::Month, DateTime::Today::Day);
String^dateString = dt-> ToString();
C. String^ dateString =
DateTimeFormatInfo::CurrentInfo::GetMonthName(DateTime::Today::Month);
D. String^ dateString = DateTime::Today::Month::ToString(“es-MX”);
Answer: A
No comments:
Post a Comment