Click here to Skip to main content
15,889,852 members
Home / Discussions / C#
   

C#

 
AnswerRe: Refactoring question Pin
Not Active25-Aug-09 15:03
mentorNot Active25-Aug-09 15:03 
AnswerRe: Refactoring question Pin
N a v a n e e t h25-Aug-09 16:26
N a v a n e e t h25-Aug-09 16:26 
QuestionConvert Process to the orginal C# COM class Pin
Gindi Bar Yahav25-Aug-09 13:07
Gindi Bar Yahav25-Aug-09 13:07 
Question[Message Deleted] Pin
WhiteWolf1925-Aug-09 11:49
WhiteWolf1925-Aug-09 11:49 
AnswerRe: C# code help Pin
Not Active25-Aug-09 12:20
mentorNot Active25-Aug-09 12:20 
AnswerRe: C# code help Pin
_Maxxx_25-Aug-09 19:38
professional_Maxxx_25-Aug-09 19:38 
QuestionEnumerator Pin
CodingYoshi25-Aug-09 11:06
CodingYoshi25-Aug-09 11:06 
AnswerRe: Enumerator Pin
Adam R Harris25-Aug-09 11:51
Adam R Harris25-Aug-09 11:51 
Have CustomerCollection contain a list of Customer objects

So your code should look something like this.
NOTE: this is not tested and probably wont compile

<code>
public class Customer
{
    public string Name{get; set;}
    ...
}

public class CustomerCollection : CollectionBase
{
    public Customer this[int index]{
        get{ return innerList[index];}
        set{ innerList[index] = value;}
    }

    public void Add(Customer item){
       innerList.Add(item);
    }
}

</code>

If you inherit CollectionBase (System.Collections.Specialized i think) you don't to inherit or even implement IEnumerable because CollectionBase does all the dirty work for you.

If at first you don't succeed ... post it on The Code Project and Pray.

GeneralRe: Enumerator Pin
CodingYoshi25-Aug-09 17:20
CodingYoshi25-Aug-09 17:20 
AnswerRe: Enumerator Pin
DaveyM6925-Aug-09 11:51
professionalDaveyM6925-Aug-09 11:51 
AnswerRe: Enumerator Pin
Alan N25-Aug-09 13:45
Alan N25-Aug-09 13:45 
AnswerRe: Enumerator Pin
N a v a n e e t h25-Aug-09 16:36
N a v a n e e t h25-Aug-09 16:36 
GeneralRe: Enumerator Pin
CodingYoshi25-Aug-09 17:22
CodingYoshi25-Aug-09 17:22 
Questionbackgroundworker problem Pin
Planker25-Aug-09 10:26
Planker25-Aug-09 10:26 
AnswerRe: backgroundworker problem Pin
DaveyM6925-Aug-09 11:44
professionalDaveyM6925-Aug-09 11:44 
AnswerRe: backgroundworker problem Pin
N a v a n e e t h25-Aug-09 16:52
N a v a n e e t h25-Aug-09 16:52 
AnswerRe: backgroundworker problem Pin
Abdul Rahman Hamidy25-Aug-09 19:51
Abdul Rahman Hamidy25-Aug-09 19:51 
QuestionChanging Crystal Reports Details Section Height programmatically PinPopular
mj_developer25-Aug-09 9:29
mj_developer25-Aug-09 9:29 
QuestionSimple syntax error? Pin
Sonhospa25-Aug-09 9:26
Sonhospa25-Aug-09 9:26 
AnswerRe: Simple syntax error? [modified] Pin
Hristo-Bojilov25-Aug-09 9:47
Hristo-Bojilov25-Aug-09 9:47 
NewsRe: Simple syntax error? Pin
Sonhospa25-Aug-09 10:04
Sonhospa25-Aug-09 10:04 
GeneralRe: Simple syntax error? Pin
Hristo-Bojilov25-Aug-09 10:22
Hristo-Bojilov25-Aug-09 10:22 
GeneralRe: Simple syntax error? Pin
Sonhospa25-Aug-09 10:29
Sonhospa25-Aug-09 10:29 
GeneralRe: Simple syntax error? Pin
Hristo-Bojilov25-Aug-09 10:30
Hristo-Bojilov25-Aug-09 10:30 
QuestionFramework 2.0 dependency Pin
Waheed Ur Rehman25-Aug-09 8:30
Waheed Ur Rehman25-Aug-09 8:30 

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.