WCF/ASMX Interoperability – Removing the Annoying xxxSpecified when Adding a Web Reference to a WCF Service

Tuesday, January 31, 2012

Today I answered a question in the Hebrew MSDN forums about consuming WCF from a .NET 2 client, using the “Add Web Reference” option of Visual Studio. Just in case you don’t know Hebrew I’ll sum it up for you – when adding a web reference to a WCF service that exposes a method of the following sort:int UseScalarTypes(int value1, int value2) The generated method signature in the client app will look like so:public void UseScalarTypes( int value1, bool value1Specified, int value2, bool value2Specified, out int UseScalarTypesResult, out bool UseScalarTypesResultSpecified) The question was why this happens and...