开发者

How to access C# MessageHeader Concrete types

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 ToHeaders 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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜