[219 - VS2005] Improper red underlining for System.Collections.Specialized object

Consider the following code snippet used by a .NET 2.0 class library that
uses System.Configuration and System.Collections.Specialized:

12 System.Configuration.Configuration config
13 =
ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
14 NameObjectCollectionBase.KeysCollection keys = config.Sections.Keys;
15 foreach (string s in keys)
16 {
17 Console.Out.WriteLine("key is '{0}'", s);
18 }

Line 14 is incorrectly underlined with a message stating "Cannot convert
source type 'System.Collections.Specialized.NameObjectCollectionBase' to
target type
'System.Collections.Specialized.NameObjectCollectionBase.KeysCollection'"
Bringing up the ReSharper "Quick Documentation" (CTRL-Q) on
config.Sections.Keys shows that the object is a NameObjectCollectionBase but
exploring this same object in VS2005 Object Explorer shows that it is a
KeysCollection.

Cheers,
Blake


2 comments
Comment actions Permalink

Please could you post this bug to the tracker

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Blake Bishop" <bbishop@sorenson.com> wrote in message
news:dtn82b$jjj$1@is.intellij.net...

Consider the following code snippet used by a .NET 2.0 class library that
uses System.Configuration and System.Collections.Specialized:

>

12 System.Configuration.Configuration config
13 =
ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
14 NameObjectCollectionBase.KeysCollection keys = config.Sections.Keys;
15 foreach (string s in keys)
16 {
17 Console.Out.WriteLine("key is '{0}'", s);
18 }

>

Line 14 is incorrectly underlined with a message stating "Cannot convert
source type 'System.Collections.Specialized.NameObjectCollectionBase' to
target type
'System.Collections.Specialized.NameObjectCollectionBase.KeysCollection'"
Bringing up the ReSharper "Quick Documentation" (CTRL-Q) on
config.Sections.Keys shows that the object is a NameObjectCollectionBase
but exploring this same object in VS2005 Object Explorer shows that it is
a KeysCollection.

>

Cheers,
Blake



0
Comment actions Permalink

Done.

"Eugene Pasynkov (JetBrains)" <Eugene.Pasynkov@jetbrains.com> wrote in
message news:dtndct$em6$1@is.intellij.net...

Please could you post this bug to the tracker

>

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Blake Bishop" <bbishop@sorenson.com> wrote in message
news:dtn82b$jjj$1@is.intellij.net...

>> Consider the following code snippet used by a .NET 2.0 class library that
>> uses System.Configuration and System.Collections.Specialized:
>>
>> 12 System.Configuration.Configuration config
>> 13 =
>> ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
>> 14 NameObjectCollectionBase.KeysCollection keys =
>> config.Sections.Keys;
>> 15 foreach (string s in keys)
>> 16 {
>> 17 Console.Out.WriteLine("key is '{0}'", s);
>> 18 }
>>
>> Line 14 is incorrectly underlined with a message stating "Cannot convert
>> source type 'System.Collections.Specialized.NameObjectCollectionBase' to
>> target type
>> 'System.Collections.Specialized.NameObjectCollectionBase.KeysCollection'"
>> Bringing up the ReSharper "Quick Documentation" (CTRL-Q) on
>> config.Sections.Keys shows that the object is a NameObjectCollectionBase
>> but exploring this same object in VS2005 Object Explorer shows that it is
>> a KeysCollection.
>>
>> Cheers,
>> Blake
>>
>



0

Please sign in to leave a comment.