In C#, I have a set of function candidates that will run in the future: void func1(int); void func2(float); void func3(string);...and many more.
some code will decide which func123... will run (or none will run), and decide the parameter value}
if (ConditionMetToRun){run that function with parameter;}
How can I do this??
ok here's an example
void WearSunStuff(whichSunscreen, whichSunglasses);
void OpenUmbrella(whichUmbrella);
void WearCoat(whichCoat);
Then I look out the windows and see it's raining. I'd better open my umbrella. But I'm at home, I don't need to open my favorite black umbrella YET.
If(FriendingIsCallingMeToGoOutside)
{
OpenUmbrella(blackUmbrella);
GoOutSideToMeetMyFriend();
}
or..... Then I look out the windows and see it's really co. I'd better wear my coat. But I'm at home, I don't need to open my favorite yellow coat YET.
If(FriendingIsCallingMeToGoOutside)
{
WearCoat(yelloCoat);
GoOutSideToMeetMyFriend();
}