[feature] Support for out parameters
See original GitHub issueHello, I need to call IDictionary.TryGetValue method in my expression, as I understand out parameters are not supported now. I’ve tried to execute following code in TryWindow application:
var dictionary = new Dictionary<string, object>();
dictionary.Add("x", 5);
object number = null;
if (dictionary.TryGetValue("x", out number))
return number;
return 0;
and have got following message:
Variable [out] unknown in expression : [out number]
Mb I did something wrong? Are there any plans to support out parameters feature?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:6 (6 by maintainers)
Top Results From Across the Web
out parameter modifier - C# Reference
Declaring a method with out arguments is a classic workaround to return multiple values. Consider value tuples for similar scenarios. The ...
Read more >out Parameter In C#
This article introduces new features of out parameter in C# 7.0. C# out parameter is used when a method returns multiple values.
Read more >In-out parameters
In-out parameters act as persistent task variables. The parameter values are updated during task execution. The parameter might store a date value for...
Read more >Out parameters
The purpose of an out parameter is to pass values back to the calling routine: the variable is passed by reference. The initial...
Read more >How to write an async method with out parameter?
The only way to have supported out-by-reference parameters would be if the async feature were done by a low-level CLR rewrite instead of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Congratulations, great job @codingseb !
I published version 1.4.20.0 that add support for
out
,ref
,in
keywords and for calling methods withparams
parameter.The implementation is a bit more permissive than in pure C# and also required to modify a bit the way the library search the right override of a method and how it manage parameters to call it. I made a few tests to ensure that the most cases work but if you find some bugs related to this don’t hesitate to open new issues.
Thanks guys I am glad that this will allow a bunch of new stuff with EE.