Implemeting typed collections

Hi!
I'm just downloaded ReSharper build 90 and try some of it features.

I have some experience with you IntelliJ Idea product and I like it very much. I spend a lot of time trying to find out some refactoring tools for MS .NET environment and can say that this one is one of the best definitely. So, your guys do a great work! Thank you very much!

However, of course because of this is pre-release version only, I encountered a some problems with build I have.
First of all there was some exceptions while R# parse (on startup) my projects and some of external libraries. I submit all of this exceptions to you. Question which I have to you is about implementing typed collections. Let's try to use following example from MSDN to implement typed collection for Int16 values:

using System;
using System.Collections;

public class Int16Collection : CollectionBase {

public Int16 this[ int index ] {
get {
return( (Int16) List[index] );
}
set {
List[index] = value;
}
}
....
....
....
}

in this case for the indexer declaration "public Int16 this[ int index ]" R# says to me following error message:
Indexer 'this' cannot implement indexer from interface IList; return type should be object.

I know that in IList we actually have Object type for indexer property but I need to return Int16 type from typed collection, not an Object. And this is a Microsoft solution how can I do this...
It seams to me that in this case it should not be a error message, but just a warning.

Regards.
Alex Krasov.

3 comments
Comment actions Permalink

Alex,

First of all there was some exceptions while R# parse (on startup) my

projects and some of external libraries. I submit all of this exceptions to
you.

could you please specify which exactly of external libraries causes this
problem? You can simply remove references to third-party assemblies from the
project one by one and try to load the project. I don't think it will take a
long to find the offending reference in such a way. I've already seen your
submitted exceptions, but we need a bit more information because we know
that some users experience these exceptions but we're still unable to
reproduce them here. So if you could help us with this issue, it would be
really great.

Thanks in advance,
Dmitry





0
Comment actions Permalink

Problem with incorrect error highlighting that you described should be fixed in the build #91.

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


Hi!
I'm just downloaded ReSharper build 90 and try some of it features.
I have some experience with you IntelliJ Idea product and I like it
very much. I spend a lot of time trying to find out some refactoring
tools for MS .NET environment and can say that this one is one of the
best definitely. So, your guys do a great work! Thank you very much!

However, of course because of this is pre-release version only, I
encountered a some problems with build I have.

First of all there was some exceptions while R# parse (on startup) my
projects and some of external libraries. I submit all of this
exceptions to you. Question which I have to you is about implementing
typed collections. Let's try to use following example from MSDN to
implement typed collection for Int16 values:

using System;
using System.Collections;
public class Int16Collection : CollectionBase {

public Int16 this[ int index ] {
get {
return( (Int16) List[index] );
}
set {
List[index] = value;
}
}
....
....
....
}
in this case for the indexer declaration "public Int16 this[ int index
]" R# says to me following error message:

Indexer 'this' cannot implement indexer from interface IList; return
type should be object.

I know that in IList we actually have Object type for indexer property
but I need to return Int16 type from typed collection, not an Object.
And this is a Microsoft solution how can I do this...

It seams to me that in this case it should not be a error message, but
just a warning.

Regards.
Alex Krasov.


0
Comment actions Permalink

I've had the same problem with the indexer and already reported it:
http://www.intellij.net/tracker/resharper/viewSCR?publicId=2948

Regards,
Thomas

Alex Krasov wrote:

Hi!
I'm just downloaded ReSharper build 90 and try some of it features.

I have some experience with you IntelliJ Idea product and I like it very much. I spend a lot of time trying to find out some refactoring tools for MS .NET environment and can say that this one is one of the best definitely. So, your guys do a great work! Thank you very much!

However, of course because of this is pre-release version only, I encountered a some problems with build I have.
First of all there was some exceptions while R# parse (on startup) my projects and some of external libraries. I submit all of this exceptions to you. Question which I have to you is about implementing typed collections. Let's try to use following example from MSDN to implement typed collection for Int16 values:

using System;
using System.Collections;

public class Int16Collection : CollectionBase {

public Int16 this[ int index ] {
get {
return( (Int16) List[index] );
}
set {
List[index] = value;
}
}
...
...
...
}

in this case for the indexer declaration "public Int16 this[ int index ]" R# says to me following error message:
Indexer 'this' cannot implement indexer from interface IList; return type should be object.

I know that in IList we actually have Object type for indexer property but I need to return Int16 type from typed collection, not an Object. And this is a Microsoft solution how can I do this...
It seams to me that in this case it should not be a error message, but just a warning.

Regards.
Alex Krasov.

0

Please sign in to leave a comment.