I receive a System.ServiceModel.Channels.Message
from a WCF service, it has a message hea开发者_Go百科der that at runtime is of type System.ServiceModel.Channels.ToHeader
but I can't find this type anywhere to upcast it to use the ToHeader
s properties.
Is this a dynamic type that can only be accessed by reflection?
You shouldn't need to access the members of the ToHeader
class (which is internal). The only property which cannot be accessed from the base (public) class is the To
(of type Uri), which you can access via the message directly (message.Headers.To
).
精彩评论