Which code segment should you use on line 5?

You plan to create a custom application that automatically creates key word best bets.

You write the following code:

01: Dim site As New SPSite(“http://internet”)
02: Dim searchContext_1 as SearchContext = SearchContext.getContext(site)
03: Dim keyWords as new KeyWord(searchContext_1, newURI(“http://internet”))
04: Dim currentKeyWord as keyWords = KeyWords.AllKeywords.Create(“AKeyWord”, DateTime.Now)
05:

You need to add a best bet to the current keyword. Which code segment should you use on line 5?

You plan to create a custom application that automatically creates key word best bets.

You write the following code:

01: Dim site As New SPSite(“http://internet”)
02: Dim searchContext_1 as SearchContext = SearchContext.getContext(site)
03: Dim keyWords as new KeyWord(searchContext_1, newURI(“http://internet”))
04: Dim currentKeyWord as keyWords = KeyWords.AllKeywords.Create(“AKeyWord”, DateTime.Now)
05:

You need to add a best bet to the current keyword. Which code segment should you use on line 5?

A.
Dim currentBestBets as BestBet = currentKeyWord.BestBets.Create(“ABestBet”), “ADescription”, newURI(“http://internet”))
currentKeyWord.Update()

B.
Dim currentBestBets as BestBet = currentKeyWord.BestBets.Create(“ABestBet”), “ADescription”, newURI(“http://internet”))
currentKeyWord.BestBests.SetPosition(currentBestBet, 0)

C.
Dim bestBet as Synonym = currentKeyWord.Synonyms.Create(“BestBets:myBestBet, AddDescription “) BestBet.Term=”http://internet”)

D.
Dim bestBet as Synonym = currentKeyWord.Synonyms.Create(“BestBets:myBestBet, http://internet “) BestBet.Term=”ADescription”



Leave a Reply 0

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