Ask coding questions

← Back to all posts
CS7036 Error
AureyLia

This should be a pretty easy fix but I'm pretty new to working with methods and parameters. I'm not understanding how to transfer variable data between methods. Sorry and thank you!

Answered by CosmicBear [earned 5 cycles]
View Answer
Voters
AureyLia
Comments
hotnewtop
CosmicBear

Line 7: Greeting();
Line 28: static void Greeting (string name, int time)
When you call Greeting, you need to pass on the variables: Greeting(name,time);
But before that, you need to declare those variables:

It should look like this:

Sorry I can't explain it better.

AureyLia

@CosmicBear no that was super helpful :) thank you so much!