Question:You are developing a method that searches a string for a substring. The method will be localized to Italy.
Your method accepts the following parameters:
The string to be searched, which is named searchList
The string for which to search, which is named searchValue
You need to write the code.
Which code segment should you use?
 

A CompareInfo comparer =
new CultureInfo("it-IT").CompareInfo;
if (comparer.IndexOf(searchList,
searchValue) > 0) {
return true;
} else {
return false;

B CultureInfo comparer = new CultureInfo("it-IT");
 if (searchList.IndexOf(searchValue)
> 0) {
return true;
} else {
return false;

C CompareInfo comparer =
new CultureInfo("it-IT").CompareInfo;
return comparer.Compare(searchList, searchValue); 

D return searchList.IndexOf(searchValue); 

+ Answer
+ Report
Total Preview: 1147

Copyright © 2024. Powered by Intellect Software Ltd