Click here to Skip to main content
15,891,136 members
Home / Discussions / C#
   

C#

 
Questionhi can any one suggest me quickest(optimized) way to call an stored procedure from my c# code for every row of data table (rows can be for example 20000)? what is "optimized" ? Pin
sohailch4015-Jul-10 3:45
sohailch4015-Jul-10 3:45 
AnswerRe: hi can any one suggest me quickest(optimized) way to call an stored procedure from my c# code for every row of data table (rows can be for example 20000)? what is "optimized" ? Pin
Ennis Ray Lynch, Jr.15-Jul-10 3:55
Ennis Ray Lynch, Jr.15-Jul-10 3:55 
QuestionDictionary <-> JSON Pin
softwarejaeger15-Jul-10 1:57
softwarejaeger15-Jul-10 1:57 
AnswerRe: Dictionary JSON Pin
Peace ON15-Jul-10 2:12
Peace ON15-Jul-10 2:12 
Questionmove items up and down in listbox Pin
NarVish15-Jul-10 1:29
NarVish15-Jul-10 1:29 
AnswerRe: move items up and down in listbox Pin
Peace ON15-Jul-10 1:45
Peace ON15-Jul-10 1:45 
GeneralRe: move items up and down in listbox Pin
NarVish15-Jul-10 3:37
NarVish15-Jul-10 3:37 
QuestionQuestion on reflection Pin
Dewald14-Jul-10 23:30
Dewald14-Jul-10 23:30 
I assume that reflection is what I'd need for this but I can't seem to find the necessary information and thought I'd turn to CP.

Let's say I have a class with a few different member variables:
public class myClass
{
    public int myInt;
    public string myString;
    public byte myByte;
}


Now I'd like to access one of the member variables in an instance of the class, based on a string variable available at run time. The following piece of code would do the job but, as you can imagine it would become very unwieldy if the class had a lot of member variables and I'd like to have it more generic anyway.
myClass myInstance = new myClass();
string whichMember;
string myValue;
.
.
.
switch (whichMember)
{
    case "myInt": myValue = myInstance.myInt.ToString(); break;
    case "myString": myValue = myInstance.myString; break;
    case "myByte": myValue = myInstance.myByte.ToString(); break;
}

AnswerRe: Question on reflection Pin
Arun Jacob14-Jul-10 23:36
Arun Jacob14-Jul-10 23:36 
GeneralRe: Question on reflection Pin
Dewald15-Jul-10 0:57
Dewald15-Jul-10 0:57 
AnswerRe: Question on reflection [modified] Pin
PIEBALDconsult15-Jul-10 3:25
mvePIEBALDconsult15-Jul-10 3:25 
GeneralRe: Question on reflection Pin
Dewald15-Jul-10 4:19
Dewald15-Jul-10 4:19 
Questionproxy problem Pin
mstfync14-Jul-10 21:02
mstfync14-Jul-10 21:02 
AnswerRe: proxy problem Pin
Pete O'Hanlon14-Jul-10 21:49
mvePete O'Hanlon14-Jul-10 21:49 
QuestionAccessing mdiParent form menu from mdiChild form via code [solved] Pin
AussieLew14-Jul-10 19:36
AussieLew14-Jul-10 19:36 
AnswerRe: Accessing mdiParent form menu from mdiChild form via code Pin
Peace ON14-Jul-10 19:48
Peace ON14-Jul-10 19:48 
GeneralRe: Accessing mdiParent form menu from mdiChild form via code Pin
AussieLew14-Jul-10 22:09
AussieLew14-Jul-10 22:09 
AnswerRe: Accessing mdiParent form menu from mdiChild form via code Pin
Peace ON14-Jul-10 22:49
Peace ON14-Jul-10 22:49 
GeneralRe: Accessing mdiParent form menu from mdiChild form via code Pin
Dave Kreskowiak15-Jul-10 2:02
mveDave Kreskowiak15-Jul-10 2:02 
AnswerRe: Accessing mdiParent form menu from mdiChild form via code [modified] Pin
DaveyM6914-Jul-10 23:54
professionalDaveyM6914-Jul-10 23:54 
GeneralRe: Accessing mdiParent form menu from mdiChild form via code Pin
AussieLew15-Jul-10 23:11
AussieLew15-Jul-10 23:11 
GeneralRe: Accessing mdiParent form menu from mdiChild form via code Pin
DaveyM6917-Jul-10 0:35
professionalDaveyM6917-Jul-10 0:35 
GeneralRe: Accessing mdiParent form menu from mdiChild form via code Pin
AussieLew27-Jul-10 13:08
AussieLew27-Jul-10 13:08 
GeneralRe: Accessing mdiParent form menu from mdiChild form via code Pin
DaveyM6930-Jul-10 10:47
professionalDaveyM6930-Jul-10 10:47 
GeneralRe: Accessing mdiParent form menu from mdiChild form via code Pin
AussieLew30-Jul-10 22:51
AussieLew30-Jul-10 22:51 

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.