Skip to content

out keyword is not working with dynamic linq #741

@rakesh94

Description

@rakesh94

Hi All,
My usecase is using dynamic linq with jsondocument objects. When searching for a key exists case, i have to try the TryGetProperty method of json document which has a out parameter.

Trying to give the linq with the out parameter causes the linq to crash saying that the out parameter is not a property or field of the classname.

Any suggestion to overcome would be helpful.

Exception
Exception message: Unhandled exception. No property or field 'out' exists in type 'classname'
Stack trace: From dotnetfiddle page -
Unhandled exception. No property or field 'out' exists in type 'Test' (at index 43)
Command terminated by signal 6

Fiddle 

https://dotnetfiddle.net/HslWa0
Line 42 works fine and line 45 crashes.

out is not considered a keyword and is trying to substitute with a variable from the class.
Am i doing this wrong or this needs a fix?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions