Issue: confusing entry in the intellisense list

Let's take a look at the following screencap:



You get the list by a Smart Code Complete (Ctrl + Shift + Space). Including the "ToString" operation in the list might be confusing because of the position of the caret which is positioned at the red arrow while it should be positioned at the blue arrow:



Regards

--
Gabriel Lozano-Morán
The .NET Aficionado
http://www.pointerx.net



6 comments
Comment actions Permalink

Don't see why the cursor should be at the blue arrow, you selected "this.ToString()" (without the this) and now you're ready to continue working. So the cursor should be at the end.

Erwin
"Gabriel Lozano-Morán" <jb-newsgroups@pointerx.net> schreef in bericht news:e69oem$k30$1@is.intellij.net...
Let's take a look at the following screencap:

...

You get the list by a Smart Code Complete (Ctrl + Shift + Space). Including the "ToString" operation in the list might be confusing because of the position of the caret which is positioned at the red arrow while it should be positioned at the blue arrow:

...

Regards

--
Gabriel Lozano-Morán
The .NET Aficionado
http://www.pointerx.net

0
Comment actions Permalink

I believe that the purpose of the ToString() is that you can add a variable in front like:

Object number = 555;
String someString = number.ToString();

Gabriel
"Erwin Derksen" <dachthetniet@onbekend.nl> wrote in message news:e6a3bf$685$1@is.intellij.net...
Don't see why the cursor should be at the blue arrow, you selected "this.ToString()" (without the this) and now you're ready to continue working. So the cursor should be at the end.

Erwin
"Gabriel Lozano-Morán" <jb-newsgroups@pointerx.net> schreef in bericht news:e69oem$k30$1@is.intellij.net...
Let's take a look at the following screencap:

...

You get the list by a Smart Code Complete (Ctrl + Shift + Space). Including the "ToString" operation in the list might be confusing because of the position of the caret which is positioned at the red arrow while it should be positioned at the blue arrow:

...

Regards

--
Gabriel Lozano-Morán
The .NET Aficionado
http://www.pointerx.net

0
Comment actions Permalink

Smart comp[letion (Ctrl + Shift + Space) filters the intellisense list and only displays members, parameters or variables of the correct type. Though the way yo want to use it, can come in handy, I filed a request (#24755) that asks for another quickfix that appends .ToString() when there is a type mismatch and the left hand side is a string. (Currently they offer a cast, a save cast and change type of). So in my opinion you select the member, parameter or variable first (with just Ctrl + Space) and then apply the quickfix.

Erwin
"Gabriel Lozano-Morán" <jb-newsgroups@pointerx.net> schreef in bericht news:e6chgh$hjt$1@is.intellij.net...
I believe that the purpose of the ToString() is that you can add a variable in front like:

Object number = 555;
String someString = number.ToString();

Gabriel
"Erwin Derksen" <dachthetniet@onbekend.nl> wrote in message news:e6a3bf$685$1@is.intellij.net...
Don't see why the cursor should be at the blue arrow, you selected "this.ToString()" (without the this) and now you're ready to continue working. So the cursor should be at the end.

Erwin
"Gabriel Lozano-Morán" <jb-newsgroups@pointerx.net> schreef in bericht news:e69oem$k30$1@is.intellij.net...
Let's take a look at the following screencap:

...

You get the list by a Smart Code Complete (Ctrl + Shift + Space). Including the "ToString" operation in the list might be confusing because of the position of the caret which is positioned at the red arrow while it should be positioned at the blue arrow:

...

Regards

--
Gabriel Lozano-Morán
The .NET Aficionado
http://www.pointerx.net

0
Comment actions Permalink

No, in this case it would call the ToString() method of the "this"
object you're currently working in.

Since your Class1 inherits from Object, it also inherits the instance
method ToString(), therefore you can call it without putting a variable
in front of it.


Gabriel Lozano-Morán wrote:

I believe that the purpose of the ToString() is that you can add a
variable in front like:

Object number = 555;
String someString = number.ToString();

Gabriel

"Erwin Derksen" <dachthetniet@onbekend.nl
<mailto:dachthetniet@onbekend.nl>> wrote in message
news:e6a3bf$685$1@is.intellij.net...
Don't see why the cursor should be at the blue arrow, you selected
"this.ToString()" (without the this) and now you're ready to
continue working. So the cursor should be at the end.

Erwin

"Gabriel Lozano-Morán" <jb-newsgroups@pointerx.net
<mailto:jb-newsgroups@pointerx.net>> schreef in bericht
news:e69oem$k30$1@is.intellij.net...
Let's take a look at the following screencap:

...

You get the list by a Smart Code Complete (Ctrl + Shift +
Space). Including the "ToString" operation in the list might be
confusing because of the position of the caret which is
positioned at the red arrow while it should be positioned at the
blue arrow:

...

Regards

--
Gabriel Lozano-Morán
The .NET Aficionado
http://www.pointerx.net

0
Comment actions Permalink

Instead of us guessing, maybe someone from the ReSharper team can tell us
what they had in mind with the ToString()?


--
Gabriel Lozano-Morán
The .NET Aficionado
http://www.pointerx.net


"Wiebe Tijsma" <wiebeREMOVE@CAPITALStijsma.com> wrote in message
news:e6mjet$u29$1@is.intellij.net...

No, in this case it would call the ToString() method of the "this" object
you're currently working in.

>

Since your Class1 inherits from Object, it also inherits the instance
method ToString(), therefore you can call it without putting a variable in
front of it.

>
>

Gabriel Lozano-Morán wrote:

>> I believe that the purpose of the ToString() is that you can add a
>> variable in front like:
>> Object number = 555;
>> String someString = number.ToString();
>> Gabriel
>>
>> "Erwin Derksen" <dachthetniet@onbekend.nl
>> <mailto:dachthetniet@onbekend.nl>> wrote in message
>> news:e6a3bf$685$1@is.intellij.net...
>> Don't see why the cursor should be at the blue arrow, you selected
>> "this.ToString()" (without the this) and now you're ready to
>> continue working. So the cursor should be at the end.
>> Erwin
>>
>> "Gabriel Lozano-Morán" <jb-newsgroups@pointerx.net
>> <mailto:jb-newsgroups@pointerx.net>> schreef in bericht
>> news:e69oem$k30$1@is.intellij.net...
>> Let's take a look at the following screencap:
>> ...
>> You get the list by a Smart Code Complete (Ctrl + Shift +
>> Space). Including the "ToString" operation in the list might be
>> confusing because of the position of the caret which is
>> positioned at the red arrow while it should be positioned at the
>> blue arrow:
>> ...
>> Regards
>>
>> --
>> Gabriel Lozano-Morán
>> The .NET Aficionado
>> http://www.pointerx.net


0
Comment actions Permalink

No, in this case it would call the ToString() method of the "this"
object you're currently working in.

Since your Class1 inherits from Object, it also inherits the instance
method ToString(), therefore you can call it without putting a
variable in front of it.


Exactly.

Valentin Kipiatkov
Chief Scientist, Vice President of Product Development
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

No, in this case it would call the ToString() method of the "this"
object you're currently working in.

Since your Class1 inherits from Object, it also inherits the instance
method ToString(), therefore you can call it without putting a
variable in front of it.

Gabriel Lozano-Moran wrote:

>> I believe that the purpose of the ToString() is that you can add a
>> variable in front like:
>>
>> Object number = 555;
>> String someString = number.ToString();
>> Gabriel
>>
>> "Erwin Derksen" <dachthetniet@onbekend.nl
>> <mailto:dachthetniet@onbekend.nl>> wrote in message
>> news:e6a3bf$685$1@is.intellij.net...
>> Don't see why the cursor should be at the blue arrow, you selected
>> "this.ToString()" (without the this) and now you're ready to
>> continue working. So the cursor should be at the end.
>> Erwin
>>
>> "Gabriel Lozano-Moran" <jb-newsgroups@pointerx.net
>> <mailto:jb-newsgroups@pointerx.net>> schreef in bericht
>> news:e69oem$k30$1@is.intellij.net...
>> Let's take a look at the following screencap:
>> ...
>>
>> You get the list by a Smart Code Complete (Ctrl + Shift + Space).
>> Including the "ToString" operation in the list might be confusing
>> because of the position of the caret which is positioned at the red
>> arrow while it should be positioned at the blue arrow:
>>
>> ...
>>
>> Regards
>>
>> --
>> Gabriel Lozano-Moran
>> The .NET Aficionado
>> http://www.pointerx.net


0

Please sign in to leave a comment.