?? and new keyword


I often use constructions like this

public CreateNewWo(NewWOData data)
{
this.data = data ?? new NewWOData();
}

to initialize not initialized variables

but when I type "?? new" and than press Space R# suggest me with not
NewWoData type as I expect.
May be it should be correctly to suggest with type as data variable type?
--
?????????? M2, ????????????? ???????? ?????????? Opera:
http://www.opera.com/mail/

2 comments
Comment actions Permalink

Fixed in 236

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Airex" <airex.s@gmail.com> wrote in message
news:op.s7zzrcqyyg18dx@w-skachkovsky.lana.vl.net.ua...

I often use constructions like this

public CreateNewWo(NewWOData data)
{
this.data = data ?? new NewWOData();
}

to initialize not initialized variables

but when I type "?? new" and than press Space R# suggest me with not
NewWoData type as I expect.
May be it should be correctly to suggest with type as data variable type?
--
ïÔÐÒÁ×ÌÅÎÏ M2, ÒÅ×ÏÌÀÃÉÏÎÎÏÊ ÐÏÞÔÏ×ÏÊ ÐÒÏÇÒÁÍÍÏÊ Opera:
http://www.opera.com/mail/


0
Comment actions Permalink

On Fri, 14 Apr 2006 17:26:05 +0400, Eugene Pasynkov (JetBrains)
<Eugene.Pasynkov@jetbrains.com> wrote:

Fixed in 236

>

thx


--
?????????? M2, ????????????? ???????? ?????????? Opera:
http://www.opera.com/mail/

0

Please sign in to leave a comment.