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

C#

 
GeneralRe: Simple Injector and Strategy pattern (Register dependency runtime based on request) Pin
nikunjmochi29-Nov-17 2:34
nikunjmochi29-Nov-17 2:34 
GeneralRe: Simple Injector and Strategy pattern (Register dependency runtime based on request) Pin
Eddy Vluggen29-Nov-17 2:52
professionalEddy Vluggen29-Nov-17 2:52 
QuestionUsing Reflection Pin
Mycroft Holmes28-Nov-17 14:21
professionalMycroft Holmes28-Nov-17 14:21 
GeneralRe: Using Reflection Pin
PIEBALDconsult28-Nov-17 14:30
mvePIEBALDconsult28-Nov-17 14:30 
AnswerRe: Using Reflection Pin
User 740747028-Nov-17 16:28
User 740747028-Nov-17 16:28 
GeneralRe: Using Reflection Pin
Mycroft Holmes28-Nov-17 23:02
professionalMycroft Holmes28-Nov-17 23:02 
GeneralRe: Using Reflection Pin
User 740747028-Nov-17 23:37
User 740747028-Nov-17 23:37 
AnswerRe: Using Reflection Pin
BillWoodruff30-Nov-17 0:35
professionalBillWoodruff30-Nov-17 0:35 
If you have the methods available: I'd be using a Dictionary:
C#
public Dictionary<KeyRefID, Func<List<decimal>> KeyRefToFunc;

public List<decimal> GetListById(KeyRefDB oKR)
{
    if(KeyRefToFunc == null) throw new ... whatever

    if(KeyRefToFunc.ContainsKey(oKR.KeyRefID))
    {
        return KeyRefToFunc[oKR.KeyRefID]();
    }
    
    throw new ... whatever
}

«While I complain of being able to see only a shadow of the past, I may be insensitive to reality as it is now, since I'm not at a stage of development where I'm capable of seeing it.» Claude Levi-Strauss (Tristes Tropiques, 1955)

GeneralRe: Using Reflection Pin
Mycroft Holmes30-Nov-17 12:01
professionalMycroft Holmes30-Nov-17 12:01 
GeneralRe: Using Reflection Pin
BillWoodruff30-Nov-17 21:48
professionalBillWoodruff30-Nov-17 21:48 
QuestionI am trying to create and write to a file using one boolean bit at a time. Pin
computerpublic28-Nov-17 13:17
computerpublic28-Nov-17 13:17 
GeneralRe: I am trying to create and write to a file using one boolean bit at a time. Pin
PIEBALDconsult28-Nov-17 14:21
mvePIEBALDconsult28-Nov-17 14:21 
AnswerRe: I am trying to create and write to a file using one boolean bit at a time. Pin
Sascha Lefèvre28-Nov-17 14:52
professionalSascha Lefèvre28-Nov-17 14:52 
AnswerRe: I am trying to create and write to a file using one boolean bit at a time. Pin
Gerry Schmitz29-Nov-17 4:59
mveGerry Schmitz29-Nov-17 4:59 
AnswerRe: I am trying to create and write to a file using one boolean bit at a time. Pin
________________2-Dec-17 23:37
________________2-Dec-17 23:37 
QuestionActive Directory Code Not Returning All Objects Pin
Kevin Marois28-Nov-17 12:37
professionalKevin Marois28-Nov-17 12:37 
AnswerRe: Active Directory Code Not Returning All Objects Pin
Richard Deeming30-Nov-17 8:04
mveRichard Deeming30-Nov-17 8:04 
QuestionHow to use RegEx for AlphaNumeric expressions Pin
Member 1348136128-Nov-17 8:56
Member 1348136128-Nov-17 8:56 
AnswerRe: How to use RegEx for AlphaNumeric expressions Pin
Dave Kreskowiak28-Nov-17 10:49
mveDave Kreskowiak28-Nov-17 10:49 
AnswerRe: How to use RegEx for AlphaNumeric expressions Pin
Dave Kreskowiak28-Nov-17 10:52
mveDave Kreskowiak28-Nov-17 10:52 
AnswerRe: How to use RegEx for AlphaNumeric expressions Pin
Gerry Schmitz29-Nov-17 4:52
mveGerry Schmitz29-Nov-17 4:52 
QuestionEntity FrameWork Question Pin
Kevin Marois28-Nov-17 6:08
professionalKevin Marois28-Nov-17 6:08 
AnswerRe: Entity FrameWork Question Pin
Richard MacCutchan28-Nov-17 6:11
mveRichard MacCutchan28-Nov-17 6:11 
GeneralRe: Entity FrameWork Question Pin
Kevin Marois28-Nov-17 6:15
professionalKevin Marois28-Nov-17 6:15 
GeneralRe: Entity FrameWork Question Pin
Richard MacCutchan28-Nov-17 6:18
mveRichard MacCutchan28-Nov-17 6:18 

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.