Open huantianad opened 2 years ago
I'm not sure your suggestion makes sense. How would you use a void method in an expression? Only the code necessary for evaluation is run. Can you give an example? You can always create you own methods that have a side effect and then return a value (ie. return this
).
Yeah my workaround has just been to return null
.
My use case is generally evaluating a method directly, for example, I could want to evaluate an expression like Console.WriteLine(1 + 1)
, which I'm only calling to evaluate the insides of the function and print it into the console (probably not something I would do).
Allow for the evaluation of methods which return void purely for the side effect, possibly under an option.
Not sure how actively maintained this project is any more, I do see @hunkydoryrepair has a more active repo with some bug fixes, but not sure if this one is active anymore.