GetHeader(T) Method (Int32)

MessageHeaders.GetHeader<T> Method (Int32)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Retrieves a message header at a specific position in this collection.

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

public T GetHeader<T>(
	int index
)

Type Parameters

T

The message header.

Parameters

index
Type: System.Int32
The zero-based index of the header to get.

Return Value

Type: T
A message header.

This method only uses the DataContractSerializer. It does not try to detect from the type whether it should use the XmlObjectSerializer or DataContractSerializer.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft