Click here to Skip to main content
16,018,534 members
Home / Discussions / C#
   

C#

 
Question[Message Deleted] Pin
Zealous_Me25-Feb-07 8:14
Zealous_Me25-Feb-07 8:14 
AnswerRe: this question twisted me. Pin
Christian Graus25-Feb-07 8:51
protectorChristian Graus25-Feb-07 8:51 
AnswerRe: this question twisted me. Pin
Colin Angus Mackay25-Feb-07 9:01
Colin Angus Mackay25-Feb-07 9:01 
QuestionProducer/Consumer & locking mechanisms... Pin
Shy Agam25-Feb-07 3:31
Shy Agam25-Feb-07 3:31 
AnswerRe: Producer/Consumer & locking mechanisms... Pin
Daniel Grunwald25-Feb-07 6:10
Daniel Grunwald25-Feb-07 6:10 
AnswerRe: Producer/Consumer & locking mechanisms... Pin
S. Senthil Kumar25-Feb-07 6:11
S. Senthil Kumar25-Feb-07 6:11 
AnswerRe: Producer/Consumer & locking mechanisms... Pin
Shy Agam25-Feb-07 7:55
Shy Agam25-Feb-07 7:55 
QuestionUse collection of elements like an indexed array Pin
Monin D.25-Feb-07 2:46
Monin D.25-Feb-07 2:46 
I want to create my own collection of elements. I do it so:
public class MyCollectionName : IEnumerable
{
     List<string> m_Collection = new List<string>();
     // Some methods here
     
     public int Count
     {
         get { return m_Collection.Count; }
     }
     
     public IEnumerator GetEnumerator()
     {
          return m_Collection.GetEnumerator();
     }
}

Is it possible to use instance of MyCollectionName like array and
what should I change in MyCollectionName class for it?
for example:
for(int i = 0; i < myCollectionInstance.Count; i++)
{
    // And here use my collection as array
    myCollectionInstance[i];
}

AnswerRe: Use collection of elements like an indexed array Pin
Luc Pattyn25-Feb-07 2:56
sitebuilderLuc Pattyn25-Feb-07 2:56 
AnswerRe: Use collection of elements like an indexed array Pin
Guffa25-Feb-07 2:59
Guffa25-Feb-07 2:59 
GeneralRe: Use collection of elements like an indexed array Pin
Monin D.25-Feb-07 3:05
Monin D.25-Feb-07 3:05 
QuestionCustom DataGrid display Pin
SunsOfFun25-Feb-07 2:22
SunsOfFun25-Feb-07 2:22 
Question[Message Deleted] Pin
Zealous_Me24-Feb-07 22:37
Zealous_Me24-Feb-07 22:37 
GeneralRe: Type Safe Variable Problem Pin
Guffa25-Feb-07 1:45
Guffa25-Feb-07 1:45 
Generalheeello mr. brainy Pin
Zealous_Me25-Feb-07 8:12
Zealous_Me25-Feb-07 8:12 
GeneralRe: heeello mr. brainy Pin
Guffa25-Feb-07 9:34
Guffa25-Feb-07 9:34 
GeneralRe: heeello mr. brainy Pin
Wayne Phipps25-Feb-07 11:29
Wayne Phipps25-Feb-07 11:29 
GeneralRe: Type Safe Variable Problem Pin
Christian Graus25-Feb-07 8:53
protectorChristian Graus25-Feb-07 8:53 
GeneralRe: Type Safe Variable Problem Pin
Dave Kreskowiak25-Feb-07 9:20
mveDave Kreskowiak25-Feb-07 9:20 
GeneralRe: Type Safe Variable Problem Pin
Christian Graus25-Feb-07 9:46
protectorChristian Graus25-Feb-07 9:46 
GeneralRe: Type Safe Variable Problem Pin
Dave Kreskowiak26-Feb-07 12:57
mveDave Kreskowiak26-Feb-07 12:57 
GeneralRe: Type Safe Variable Problem Pin
Guffa25-Feb-07 9:36
Guffa25-Feb-07 9:36 
AnswerRe: Type Safe Variable Problem Pin
Professor Sharada Ulhas26-Feb-07 13:45
Professor Sharada Ulhas26-Feb-07 13:45 
QuestionDenying access to file Pin
sharpiesharpie24-Feb-07 21:51
sharpiesharpie24-Feb-07 21:51 
AnswerRe: Denying access to file Pin
coolestCoder25-Feb-07 0:05
coolestCoder25-Feb-07 0:05 

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.