2

Hi i'm getting this error, do I have to add a special namespace? "The type or namespace name 'call' could not be found..."

private void start_btn_Click(object sender, EventArgs e)
{
    call DoIt();

}

void DoIt() 
{
    ...code
}

4 Answers 4

6

Just invoke DoIt directly without call. There is no such operation as call in C#

DoIt();
Sign up to request clarification or add additional context in comments.

Comments

3

One doesn't use call to invoke a function in C#, so fix your code thus:

private void start_btn_Click(object sender, EventArgs e)
{
    DoIt();
}

As @Kheldar has suggested, you're probably thinking of the call statement in Visual Basic, which isn't a feature of C#.

Comments

2

Remove "call" and your code will run.

VB6 or Windows Script coder much? ;)

Comments

1

Remove call in your snippet, in C# does not exist such kind of keyword. DoIt(); will execute your function pretty well.

Anyway, I think you might want to read something like:

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.