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 Dim objComparer As CompareInfo = _
New CultureInfo("it-IT").CompareInfo
Return objComparer.Compare(SearchList, SearchValue) 

B Return SearchList.IndexOf(SearchValue) 

C Dim objComparer As CompareInfo = _
New CultureInfo("it-IT").CompareInfo
If objComparer.IndexOf(SearchList, SearchValue) > 0 Then Return True
Else
Return False
End If 

D Dim objComparer As CompareInfo = _
New CultureInfo("it-IT").CompareInfo
If SearchList.IndexOf(SearchValue) > 0 Then
Return True
Else
Return False
End If 

+ Answer
+ Report
Total Preview: 794

Copyright © 2024. Powered by Intellect Software Ltd