I have a method like this:
CreateOrder(XmlDocument OrderData, out int OrderId);
This method is called from an Expression shape in an orchestration. However, during compilation, a warning like this comes up:
'OrderId' is initialized but its value is never used
OrderId is a variable created within the proper scope in the orchestration and the method is correctly called from an expression within that scope. Question is, why does the compiler flag this variable as unused?
You might hit the same issue as per How do I pass an "out int" parameter in BizTalk orchestration?
So you are probably better having your CreateOrder
Returnthe OrderId, rather than using an out parameter. e.g.