共用方式為


MessageHeaders.CopyHeaderFrom Method (Message, Int32)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Copies the header content located at the specified index from the specified message to this instance.

Namespace:  System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

Syntax

'Declaration
Public Sub CopyHeaderFrom ( _
    message As Message, _
    headerIndex As Integer _
)
public void CopyHeaderFrom(
    Message message,
    int headerIndex
)

Parameters

  • headerIndex
    Type: System.Int32
    The location of the original message header, from which the content is copied over.

Remarks

Platform Notes

Silverlight for Windows Phone Silverlight for Windows Phone

 CopyHeaderFrom() displays the message Specified argument was out of the range of valid values instead of The value of this argument must fall within the range 0 to 1.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.