Click here to Skip to main content
15,899,005 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# locks and atomicity Pin
Frank Horn26-Jun-08 7:50
Frank Horn26-Jun-08 7:50 
GeneralRe: C# locks and atomicity Pin
Judah Gabriel Himango26-Jun-08 8:28
sponsorJudah Gabriel Himango26-Jun-08 8:28 
GeneralRe: C# locks and atomicity Pin
Frank Horn26-Jun-08 9:48
Frank Horn26-Jun-08 9:48 
GeneralRe: C# locks and atomicity Pin
Judah Gabriel Himango26-Jun-08 12:08
sponsorJudah Gabriel Himango26-Jun-08 12:08 
GeneralRe: C# locks and atomicity Pin
Frank Horn26-Jun-08 20:44
Frank Horn26-Jun-08 20:44 
QuestionGet Struct Element by string Pin
robert rodgers24-Jun-08 8:47
robert rodgers24-Jun-08 8:47 
AnswerRe: Get Struct Element by string Pin
Judah Gabriel Himango24-Jun-08 10:24
sponsorJudah Gabriel Himango24-Jun-08 10:24 
GeneralRe: Get Struct Element by string Pin
robert rodgers25-Jun-08 3:34
robert rodgers25-Jun-08 3:34 
Thanks for your time. I looked at the reflection information and it looks like that might work. But I think I need a little nudge in the right direction.

Thanks again. Rob

I want to turn something like this...
private List<Instruction> GetInstructions(string sInst)
        {
            List<Instruction> Instructions = new List<Instruction>();
            string[] aInst = sInst.Split(';');
            foreach (string i in aInst)
            {
                string[] u = i.Split('=');
                Instruction newInst = new Instruction();
                switch (u[0])
                {
                    case "Element1":
                        newInst.Element1 = u[1];
                        break;
                    case "Element2":
                        newInst.Element2 = u[1];
                        break;
                    case "Element3":
                        newInst.Element3 = u[1];
                        break;
                    case "Element4":
                        newInst.Element4 = u[1];
                        break;
                    case "Element5":
                        newInst.Element5 = u[1];
                        break;

                        //...
                }
                Instructions.Add(newInst);
            }
            return Instructions;
        }



Into something like this...
private List<Instruction> GetInstructions(string sInst)
{
    List<Instruction> Instructions = new List<Instruction>();
    string[] aInst = sInst.Split(';');
    foreach (string i in aInst)
    {
        string[] u = i.Split('=');
        Instruction newInst = new Instruction();
        ptrToElement = GetPointerToElement(newInst, u[1]);
        ptrToElement = u[0];
        Instructions.Add(newInst);

    }
    return Instructions;
}

GeneralRe: Get Struct Element by string Pin
robert rodgers25-Jun-08 3:42
robert rodgers25-Jun-08 3:42 
GeneralRe: Get Struct Element by string Pin
Judah Gabriel Himango25-Jun-08 4:55
sponsorJudah Gabriel Himango25-Jun-08 4:55 
GeneralRe: Get Struct Element by string Pin
robert rodgers25-Jun-08 5:22
robert rodgers25-Jun-08 5:22 
QuestionI am trying to save chinese charecter into sql 2005 database from asp.net,c# website Pin
mdpavel24-Jun-08 6:32
mdpavel24-Jun-08 6:32 
AnswerRe: I am trying to save chinese charecter into sql 2005 database from asp.net,c# website Pin
Paul Conrad24-Jun-08 6:51
professionalPaul Conrad24-Jun-08 6:51 
AnswerRe: I am trying to save chinese charecter into sql 2005 database from asp.net,c# website Pin
Ennis Ray Lynch, Jr.24-Jun-08 7:02
Ennis Ray Lynch, Jr.24-Jun-08 7:02 
AnswerRe: I am trying to save chinese charecter into sql 2005 database from asp.net,c# website Pin
N a v a n e e t h24-Jun-08 7:42
N a v a n e e t h24-Jun-08 7:42 
AnswerRe: I am trying to save chinese charecter into sql 2005 database from asp.net,c# website Pin
mdpavel24-Jun-08 8:20
mdpavel24-Jun-08 8:20 
AnswerRe: I am trying to save chinese charecter into sql 2005 database from asp.net,c# website Pin
mdpavel24-Jun-08 11:05
mdpavel24-Jun-08 11:05 
QuestionDifferent audio device in System.Speech.Synthesis Pin
Firedragonweb24-Jun-08 5:22
Firedragonweb24-Jun-08 5:22 
AnswerRe: Different audio device in System.Speech.Synthesis Pin
DaveyM6924-Jun-08 6:30
professionalDaveyM6924-Jun-08 6:30 
AnswerRe: Different audio device in System.Speech.Synthesis Pin
DaveyM6924-Jun-08 6:35
professionalDaveyM6924-Jun-08 6:35 
GeneralRe: Different audio device in System.Speech.Synthesis Pin
Firedragonweb24-Jun-08 7:12
Firedragonweb24-Jun-08 7:12 
AnswerRe: Different audio device in System.Speech.Synthesis [modified] Pin
Firedragonweb24-Jun-08 8:14
Firedragonweb24-Jun-08 8:14 
QuestionThread Safe Generic Dictionary Collection Pin
Waleed Eissa24-Jun-08 5:15
Waleed Eissa24-Jun-08 5:15 
AnswerRe: Thread Safe Generic Dictionary Collection Pin
leppie24-Jun-08 6:00
leppie24-Jun-08 6:00 
AnswerRe: Thread Safe Generic Dictionary Collection Pin
Ennis Ray Lynch, Jr.24-Jun-08 6:01
Ennis Ray Lynch, Jr.24-Jun-08 6:01 

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.