Enas Hasan
Enas Hasan

Reputation: 1

What does "FunctionName(bool() args)" mean in C#?

Can someone tell me what FunctionName(bool() args) means in C#?

Upvotes: 0

Views: 572

Answers (2)

LukeH
LukeH

Reputation: 269558

It doesn't mean anything!

Are you sure that the bool() part is meant to contain parentheses and not square brackets?

If it was declared with square brackets as FunctionName(bool[] args) then that would mean that there's a method called FunctionName which takes a single argument called args, and that argument must be an array of bool values.

If this is meant to be a method declaration then it would also need a return type. For example, string FunctionName(bool[] args) or void FunctionName(bool[] args) etc.

Upvotes: 3

SLaks
SLaks

Reputation: 887877

That is invalid syntax in C#.

You probably meant FunctionName(bool[] args) ([] instead of ()), which means a function that takes an array of booleans called args as a parameter.

Note that it's missing a return type, so it should probably be voidFunctionName(bool[] args) (or some other type instead of void)

Upvotes: 7

Related Questions