I want to pass a method with a parameter in a parameter like this. But it still got error and i didn't know what to do.
void WriteInScreen(string text){
Console.WriteLine(text);
}
void WriteInScreen10Times(string text){
for (int i = 1; i <= 10; i++){
Console.WriteLine(text);
}
}
void CallWriteInScreen(Action Method) {
Method();
}
void StartCall(){
//Error: Argument 2: Can't not convert from void to System.Action
CallWriteInScreen(WriteInScreen("Hello!"));
CallWriteInScreen(WriteInScreen10Time("Hi!"));
}
This is just my test code, i need to solve this to continue develop my program.