when i run this method it shows below error,
public bool SaveDocument(out string newDocumentNo, ReciptUpdate reciptUpdate)
{
newDocumentNo = "MB120055";
return true;
}
The error is
ArgumentException: Type must not be ByRef
Parameter name: type
I got this same error message because I added an "in" modifier to a controller method when tinkering with some optimisation and didn't notice that it broke the aspnet.core runtime invocation of the method (resulting in this somewhat cryptic error)
The original method signature:
public IActionResult ReceiveMessage(string topicName, [FromBody] in CloudEvent update)
The fix:
public IActionResult ReceiveMessage(string topicName, [FromBody] CloudEvent update)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With