R# 3.0 (#460) Value analysis Permanently deleted user Created June 15, 2007 08:49 I have next code:string nameValue = null;Values.TryGetValue(key, out value);if (nameValue != null) // on this line - Expression is always false{...}
What is 'Values'? And isn't it marked by 'NotNull' attribute?
--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Alexander Nesterenko" <framework3705@mail.ru> wrote in message
news:57490f098f758c97d51eb83900e@news.jetbrains.com...
>I have next code:
>
>
>
>
Values is property of the type System.Collections.Generic.SortedDictionary<TKey,TValue>
Hello Alexander,
If there is no typo in the post, it is correct. You have "out value", which
doesn't change "nameValue".
Sincerely,
Ilya Ryzhenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
AN> I have next code:
AN>
AN> string nameValue = null;
AN> Values.TryGetValue(key, out value);
AN> if (nameValue != null) // on this line - Expression is always false
AN> {
AN> ...
AN> }
Thanks, it's typo :)
All is OK. You pass 'value' as out-argument, and then check other variable
'nameValue'
--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Alexander Nesterenko" <framework3705@mail.ru> wrote in message
news:57490f098f758c97d51eb83900e@news.jetbrains.com...
>I have next code:
>
>
>
>