Click here to Skip to main content
15,913,939 members
Home / Discussions / C#
   

C#

 
QuestionHELP NEEDED - DCOM Server in C#? Pin
r6yamaha29-Mar-07 8:16
r6yamaha29-Mar-07 8:16 
QuestionProblem using ListView control? Pin
Khoramdin29-Mar-07 8:10
Khoramdin29-Mar-07 8:10 
AnswerRe: Problem using ListView control? Pin
kubben29-Mar-07 8:19
kubben29-Mar-07 8:19 
QuestionHow to install the IE plugin from DLL Pin
Nadia Monalisa29-Mar-07 7:59
Nadia Monalisa29-Mar-07 7:59 
QuestionCan I create an array or List<> of class properties? [modified] Pin
Member 9629-Mar-07 7:38
Member 9629-Mar-07 7:38 
AnswerRe: Can I create an array or List of class properties? Pin
Not Active29-Mar-07 7:58
mentorNot Active29-Mar-07 7:58 
GeneralRe: Can I create an array or List of class properties? Pin
Member 9629-Mar-07 8:09
Member 9629-Mar-07 8:09 
GeneralRe: Can I create an array or List of class properties? Pin
Not Active29-Mar-07 8:28
mentorNot Active29-Mar-07 8:28 
Is this closer or am I totally off base

    public class Custom1<br />
    {<br />
        private string m_Test;<br />
<br />
        public enum Property<br />
        {<br />
            Prop1,<br />
            Prop2,<br />
            Prop3<br />
        }<br />
<br />
        public string this[Property x]<br />
        {<br />
            get<br />
            {<br />
                switch(x)<br />
                {<br />
                    case Property.Prop1:<br />
                        return Prop1;<br />
                    default:<br />
                        return string.Empty;<br />
                }<br />
            }<br />
            set<br />
            {<br />
                switch(x)<br />
                {<br />
                    case Property.Prop1:<br />
                        Prop1 = value;<br />
                        break;<br />
                    default:<br />
                        break;<br />
                }<br />
            }<br />
        }<br />
        <br />
        public string Prop1<br />
        {<br />
            set{ m_Test = value;}<br />
            get { return m_Test; }<br />
        }<br />
}<br />
Custom1 c = new Custom1();<br />
c[Custom1.Property.Prop1] = "Hello, World";<br />
<br />



only two letters away from being an asset

GeneralRe: Can I create an array or List of class properties? Pin
Member 9629-Mar-07 8:58
Member 9629-Mar-07 8:58 
GeneralRe: Can I create an array or List of class properties? Pin
Not Active29-Mar-07 9:22
mentorNot Active29-Mar-07 9:22 
GeneralRe: Can I create an array or List of class properties? Pin
Member 9629-Mar-07 10:02
Member 9629-Mar-07 10:02 
AnswerRe: Can I create an array or List of class properties? Pin
led mike29-Mar-07 8:13
led mike29-Mar-07 8:13 
GeneralRe: Can I create an array or List of class properties? Pin
Member 9629-Mar-07 8:19
Member 9629-Mar-07 8:19 
GeneralRe: Can I create an array or List of class properties? Pin
led mike29-Mar-07 8:30
led mike29-Mar-07 8:30 
GeneralRe: Can I create an array or List of class properties? Pin
Member 9629-Mar-07 8:59
Member 9629-Mar-07 8:59 
AnswerRe: Can I create an array or List of class properties? Pin
Leslie Sanford29-Mar-07 10:41
Leslie Sanford29-Mar-07 10:41 
GeneralRe: Can I create an array or List of class properties? Pin
Member 9629-Mar-07 10:51
Member 9629-Mar-07 10:51 
QuestionQuick Question Pin
Ennis Ray Lynch, Jr.29-Mar-07 7:14
Ennis Ray Lynch, Jr.29-Mar-07 7:14 
AnswerRe: Quick Question Pin
kubben29-Mar-07 7:26
kubben29-Mar-07 7:26 
GeneralRe: Quick Question Pin
Ennis Ray Lynch, Jr.29-Mar-07 8:10
Ennis Ray Lynch, Jr.29-Mar-07 8:10 
GeneralRe: Quick Question Pin
kubben5-Apr-07 9:35
kubben5-Apr-07 9:35 
GeneralRe: Quick Question Pin
Vasudevan Deepak Kumar29-Mar-07 9:05
Vasudevan Deepak Kumar29-Mar-07 9:05 
AnswerRe: Quick Question Pin
Member 9629-Mar-07 7:40
Member 9629-Mar-07 7:40 
QuestionThreading Pin
HexaDeveloper29-Mar-07 6:02
HexaDeveloper29-Mar-07 6:02 
AnswerRe: Threading Pin
Not Active29-Mar-07 6:12
mentorNot Active29-Mar-07 6:12 

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.