Click here to Skip to main content
15,916,318 members
Home / Discussions / C#
   

C#

 
GeneralRe: Audio/Video Library Pin
leppie25-Nov-02 7:21
leppie25-Nov-02 7:21 
GeneralRe: Audio/Video Library Pin
Jassim Rahma25-Nov-02 7:27
Jassim Rahma25-Nov-02 7:27 
GeneralRe: Audio/Video Library Pin
Christian Graus25-Nov-02 12:07
protectorChristian Graus25-Nov-02 12:07 
Questionwhen can we run our C# program in Mac or Linux? Pin
KeithPRC24-Nov-02 16:56
KeithPRC24-Nov-02 16:56 
AnswerRe: when can we run our C# program in Mac or Linux? Pin
Not Active24-Nov-02 17:40
mentorNot Active24-Nov-02 17:40 
GeneralRe: when can we run our C# program in Mac or Linux? Pin
KeithPRC24-Nov-02 18:12
KeithPRC24-Nov-02 18:12 
GeneralRe: when can we run our C# program in Mac or Linux? Pin
SimonS24-Nov-02 20:32
SimonS24-Nov-02 20:32 
AnswerRe: when can we run our C# program in Mac or Linux? Pin
Michael P Butler24-Nov-02 23:15
Michael P Butler24-Nov-02 23:15 
GeneralRe: when can we run our C# program in Mac or Linux? Pin
leppie25-Nov-02 22:43
leppie25-Nov-02 22:43 
AnswerRe: when can we run our C# program in Mac or Linux? Pin
LongRange.Shooter26-Nov-02 8:20
LongRange.Shooter26-Nov-02 8:20 
GeneralCreating a new NetworkStream class Pin
winsurfin24-Nov-02 15:00
winsurfin24-Nov-02 15:00 
GeneralRe: Creating a new NetworkStream class Pin
John Fisher25-Nov-02 10:23
John Fisher25-Nov-02 10:23 
GeneralEmbedded Resource Pin
heldaio23-Nov-02 15:28
heldaio23-Nov-02 15:28 
GeneralRe: Embedded Resource Pin
Nick Parker24-Nov-02 18:44
protectorNick Parker24-Nov-02 18:44 
GeneralThread Sleeping using an enum Pin
MStanbrook23-Nov-02 3:58
MStanbrook23-Nov-02 3:58 
GeneralRe: Thread Sleeping using an enum Pin
David Stone23-Nov-02 5:16
sitebuilderDavid Stone23-Nov-02 5:16 
GeneralRe: Thread Sleeping using an enum Pin
Nick Parker24-Nov-02 18:40
protectorNick Parker24-Nov-02 18:40 
GeneralRe: Thread Sleeping using an enum Pin
David Stone25-Nov-02 8:43
sitebuilderDavid Stone25-Nov-02 8:43 
QuestionThreads can't communicate without a while(true) loop? Pin
Bog22-Nov-02 16:56
Bog22-Nov-02 16:56 
AnswerRe: Threads can't communicate without a while(true) loop? Pin
James T. Johnson22-Nov-02 17:20
James T. Johnson22-Nov-02 17:20 
GeneralRe: Threads can't communicate without a while(true) loop? Pin
Bog22-Nov-02 18:04
Bog22-Nov-02 18:04 
GeneralRe: Threads can't communicate without a while(true) loop? Pin
James T. Johnson23-Nov-02 7:39
James T. Johnson23-Nov-02 7:39 
GeneralRe: Threads can't communicate without a while(true) loop? Pin
Bog23-Nov-02 8:51
Bog23-Nov-02 8:51 
QuestionType-safe indexers when inheriting from IList? Pin
Domenic Denicola22-Nov-02 16:49
Domenic Denicola22-Nov-02 16:49 
AnswerRe: Type-safe indexers when inheriting from IList? Pin
James T. Johnson22-Nov-02 17:33
James T. Johnson22-Nov-02 17:33 
It does seem like its impossible, but it isn't (thankfully) Big Grin | :-D

C# (and .NET) supports the ability to specify which methods/properties should be used to implement an interface.

To do so, precede the method/property name with the name of the interface and drop the visibility modifier (because interface methods must always be public).

In your case...

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

object IList.this[int index] {
  get { return this.myArrayList[index]; }
  set { return this.myArrayList[index] = value; }
}
As an aside, if you're using an ArrayList for the underlying implementation why not inherit from CollectionBase and not have to worry about implementing IList, ICollection, etc. You just need to worry about the typesafe methods for your collection.

James

- out of order -

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.