Click here to Skip to main content
15,905,414 members
Home / Discussions / C#
   

C#

 
AnswerRe: windows application Pin
Manas Bhardwaj8-Jun-10 9:08
professionalManas Bhardwaj8-Jun-10 9:08 
AnswerRe: windows application [modified] Pin
#realJSOP8-Jun-10 10:04
professional#realJSOP8-Jun-10 10:04 
AnswerRe: windows application Pin
LookSharp9-Jun-10 3:54
LookSharp9-Jun-10 3:54 
GeneralRe: windows application Pin
jashimu9-Jun-10 7:56
jashimu9-Jun-10 7:56 
QuestionLINQ DataContext and IDisposable Pin
Member 39190498-Jun-10 7:01
Member 39190498-Jun-10 7:01 
AnswerRe: LINQ DataContext and IDisposable Pin
Pete O'Hanlon8-Jun-10 10:01
mvePete O'Hanlon8-Jun-10 10:01 
QuestionIndexer Question Pin
David Knechtges8-Jun-10 5:54
David Knechtges8-Jun-10 5:54 
AnswerRe: Indexer Question Pin
harold aptroot8-Jun-10 6:10
harold aptroot8-Jun-10 6:10 
The C# spec has this to say about indexers:
Indexer declarations are similar to property declarations, with the main differences being that indexers are nameless (the “name” used in the declaration is this, since this is being indexed) and that indexers include indexing parameters. The indexing parameters are provided between square brackets.
edit: page 60/553 of ECMA-334 4th edition (June 2006)

Which means that you can not declare an indexer with a name, you can only use indexers to write expressions of the form instance[parameter list]

To give it a name, you have to cheat - for example by having a field (with the wanted name, of course) of a type that has an indexer. Usually, that would be a field of an other type, which you created solely to be indexed. That type should, of course, have enough information to be indexed, but you could pass in the entire "parent" instance (edit: at the ctor, when you initialize that field).
AnswerRe: Indexer Question Pin
T M Gray8-Jun-10 10:45
T M Gray8-Jun-10 10:45 
GeneralRe: Indexer Question Pin
harold aptroot8-Jun-10 10:56
harold aptroot8-Jun-10 10:56 
AnswerRe: Indexer Question Pin
LookSharp8-Jun-10 17:15
LookSharp8-Jun-10 17:15 
Questionmaking a text box more efficient Pin
codie30078-Jun-10 5:43
codie30078-Jun-10 5:43 
AnswerRe: making a text box more efficient Pin
Dave Kreskowiak8-Jun-10 6:23
mveDave Kreskowiak8-Jun-10 6:23 
GeneralRe: making a text box more efficient Pin
AspDotNetDev8-Jun-10 9:21
protectorAspDotNetDev8-Jun-10 9:21 
GeneralRe: making a text box more efficient Pin
Dave Kreskowiak8-Jun-10 10:12
mveDave Kreskowiak8-Jun-10 10:12 
GeneralRe: making a text box more efficient Pin
Pete O'Hanlon8-Jun-10 10:42
mvePete O'Hanlon8-Jun-10 10:42 
GeneralRe: making a text box more efficient Pin
Dave Kreskowiak8-Jun-10 12:09
mveDave Kreskowiak8-Jun-10 12:09 
GeneralRe: making a text box more efficient Pin
AspDotNetDev8-Jun-10 10:47
protectorAspDotNetDev8-Jun-10 10:47 
GeneralRe: making a text box more efficient Pin
Luc Pattyn8-Jun-10 11:03
sitebuilderLuc Pattyn8-Jun-10 11:03 
GeneralRe: making a text box more efficient Pin
AspDotNetDev8-Jun-10 12:45
protectorAspDotNetDev8-Jun-10 12:45 
GeneralRe: making a text box more efficient Pin
Luc Pattyn8-Jun-10 12:59
sitebuilderLuc Pattyn8-Jun-10 12:59 
GeneralRe: making a text box more efficient Pin
AspDotNetDev8-Jun-10 13:19
protectorAspDotNetDev8-Jun-10 13:19 
GeneralRe: making a text box more efficient Pin
Luc Pattyn8-Jun-10 13:26
sitebuilderLuc Pattyn8-Jun-10 13:26 
GeneralRe: making a text box more efficient Pin
AspDotNetDev8-Jun-10 13:59
protectorAspDotNetDev8-Jun-10 13:59 
GeneralRe: making a text box more efficient Pin
Luc Pattyn8-Jun-10 14:06
sitebuilderLuc Pattyn8-Jun-10 14:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.