views:

47

answers:

2

I'm looking at WCF documentation in the MSDN (http://msdn.microsoft.com/en-us/library/bb332338.aspx), and have come across this wee piece of config:

<endpoint name="basicHttpBinding"
    address=""
    binding="basicHttpBinding"
    contract="QuickReturns.StockTrading.ExchangeService.?
        Contracts.ITradeService"/>

Can anyone tell me if the question mark is related to WCF, or if it's XML attribute line continuation? I haven't found the answer yet.

+1  A: 

The question mark is a typo - it shouldn't be there as it is not a valid part of type name that is being specified for the contract.

Since namespaces and types cannot begin with a question mark it is impossible that this configuration is correct as this could never be a valid CLR type name:

QuickReturns.StockTrading.ExchangeService.?Contracts.ITradeService

The question mark is some kind of mistake on MSDN (perhaps they meant to add some sort of character indicating a newline and messed up - I am not sure). You can safely remove it and carry on.

Andrew Hare
A: 

I'm pretty sure that this is a placeholder which was inserted by a text editor for a "line break marker". It shouldn't be there, remove the ? and all following whitespace (including newline) and you should be fine.

Lucero