tags:

views:

237

answers:

5

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

A: 

There is no such thing.

Where have you found this?

empi
+3  A: 

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.

LukeH
doesn't that need the `params`keyword?
Natrium
@Natrium: Nope.
LukeH
right, cause this is just an array
Natrium
+7  A: 

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)

SLaks
A: 

no i mean () i think it calls fnction inside other function but i'm not sure :S

thanks anyway :)

Enas Hasan
@Enas: Please add extra information by commenting or editing your question, *not* by posting an answer.
LukeH
Could you also add a more complete example of the code where you've seen this syntax so that we can see the context.
LukeH
A: 

actually someone asked me about it

Enas Hasan