Click here to monitor SSC

Bart

Software Engineer - Red Gate Software

.NET Reflector Support: How does .NET Reflector deal with indexers?

Published Thursday, July 30, 2009 6:44 PM

As with other members, .NET Reflector does support indexers. However, if you're unfamiliar with the notation this may not be immediately obvious, because indexers are treated as properties of the form Item[<index typename>] : <return typename>. Thus, they appear along with the other properties in the treeview, rather than in a separate group, like methods, or member variables. They are grouped together though, as the following example, taken from the System.Data.SqlClient.SqlParameterCollection class, shows:

Indexers on the SqlParameterCollection class.

.NET Reflector can also successfully reflect over and decompile generic indexers, such as this example in System.Collections.Generic.Dictionary<TKey, TValue>:

Dictionary_GenericIndexer

(Click on the image for a larger view.)

by Bart Read
Filed Under: , ,

Comments

No Comments
You need to sign in to comment on this blog

About Bart Read

Bart has done many things since he started work at Red Gate Software Ltd in August 2004, but nowadays he's (mainly) the product manager for the .NET Developer Tools. He still feels like this is a bit like admitting you were cheering for the Empire whilst watching Star Wars, but for now he's along for the ride. In a previous incarnation he was a project manager leading the .NET Reflector Pro, ANTS Memory Profiler 5, ANTS Performance Profiler 4 & 5, and SQL Prompt 3.0 - 3.6 projects. He still occasionally writes some code and, in the past, has touched the code for most of the Red Gate SQL developer tools... some of them still haven't recovered from the shock. He was born and grew up in Dorset, was educated in Nottingham and London, and likes music and real ale. His photo is extremely misleading.
<July 2009>
SuMoTuWeThFrSa
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678
How to Kill a Company in One Step or Save it in Three
 The majority of companies that suffer a major data loss subsequently go out of business. Wesley David... Read more...

Migrating from OCS 2007 R2 to Lync: Part 4
 Having migrated the rest of our users and legacy resources across and started getting ready to... Read more...

Automated Script-generation with Powershell and SMO
 In the first of a series of articles on automating the process of building, modifying and copying SQL... Read more...

Seth Godin: Big in the IT Business
 Seth Godin has transformed our understanding of marketing in IT. He invented the concept of 'permission... Read more...

Using SQL Test Database Unit Testing with TeamCity Continuous Integration
 With database applications, the process of test and integration can be frustratingly slow because so... Read more...