syntax - Can this be interpreted as an invocation expression in C#? -
according c# grammar, 1 can write
(a)(b) which can interpreted either invocation expression or type cast. can please provide valid c# example interprets case invocation expression?
this grammar rule i'm referring to:
invocation-expression: primary-expression ( argument-list? ) and primariy-expression can parenthesised expression.
like this?
((action<string>)console.writeline)("test"); or this, expression:
((func<int>)console.read)() edit: doubt there way primary-expression simple identifier, gets parsed cast (even (writeline)()), it's not big deal, can remove parentheses.
Comments
Post a Comment