samedi 1 octobre 2016

C# - Use reflection to test all cases of a method execution

I do realize this is almost impossible (if not impossible at all). I have a function, say:

void foo(int i){
    if(i==0) //do stuff
    else //do other stuff
}

And I want use reflection to invoke this method. Is there anyway that I can satisfy both cases of the if statement?





Aucun commentaire:

Enregistrer un commentaire