>' Create the operation context scope needed to add headers >Using loSOAPSVC.oOperationContextScope = New System.ServiceModel.OperationContextScope(loMyService.InnerChannel) > >End Using >>
using (mySvc.Something = new OperationContext()) { mySvc.Something = new OperationContext(); };whereas the following gives the expected error 'Readonly local variable cannot be used in any execution path':
using (var test = new OperationContext()) { test = new OperationContext(); };Seems to me C# is letting an invalid construct slip past?