trygetvalue? Please help
-
string translationText = ""; if(dicText.TryGetValue(translation[r].EntryCode, out translationText)) { dicText.Add(translation[r].EntryCode, translationText); } I don't get this method. As far as I understand it, it should do one lookup and if found then assign the related value of "translation[r].EntryCode" to translationText. Is this correct?
-
string translationText = ""; if(dicText.TryGetValue(translation[r].EntryCode, out translationText)) { dicText.Add(translation[r].EntryCode, translationText); } I don't get this method. As far as I understand it, it should do one lookup and if found then assign the related value of "translation[r].EntryCode" to translationText. Is this correct?
TTFCAFO or RTFM or STFW or ... Just type the code and time it and see what works best. Thats what we do when we don't know the answer.
A man said to the universe: "Sir I exist!" "However," replied the Universe, "The fact has not created in me A sense of obligation." -- Stephen Crane
-
string translationText = ""; if(dicText.TryGetValue(translation[r].EntryCode, out translationText)) { dicText.Add(translation[r].EntryCode, translationText); } I don't get this method. As far as I understand it, it should do one lookup and if found then assign the related value of "translation[r].EntryCode" to translationText. Is this correct?