MessageHeaders.FindHeader Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Finds a message header in this collection.
Overloads
FindHeader(String, String) |
Finds a message header in this collection by the specified LocalName and namespace URI of the header element. |
FindHeader(String, String, String[]) |
Finds a message header in this collection by the specified LocalName, namespace URI and actors of the header element. |
FindHeader(String, String)
- Source:
- MessageHeaders.cs
- Source:
- MessageHeaders.cs
Finds a message header in this collection by the specified LocalName and namespace URI of the header element.
public:
int FindHeader(System::String ^ name, System::String ^ ns);
public int FindHeader (string name, string ns);
member this.FindHeader : string * string -> int
Public Function FindHeader (name As String, ns As String) As Integer
Parameters
- name
- String
The LocalName of the header XML element.
- ns
- String
The namespace URI of the header XML element.
Returns
The index of the message header in this collection if found or -1 if the header specified does not exist.
Exceptions
Arguments are null
.
The header specified by the arguments exists multiple times.
Applies to
FindHeader(String, String, String[])
- Source:
- MessageHeaders.cs
- Source:
- MessageHeaders.cs
Finds a message header in this collection by the specified LocalName, namespace URI and actors of the header element.
public:
int FindHeader(System::String ^ name, System::String ^ ns, ... cli::array <System::String ^> ^ actors);
public int FindHeader (string name, string ns, params string[] actors);
member this.FindHeader : string * string * string[] -> int
Public Function FindHeader (name As String, ns As String, ParamArray actors As String()) As Integer
Parameters
- name
- String
The LocalName of the header XML element.
- ns
- String
The namespace URI of the header XML element.
- actors
- String[]
The targeted recipient of the message header.
Returns
The index of the message header in this collection if found, or -1 if the header specified does not exist.
Exceptions
Arguments are null
.
The header specified by the arguments exists multiple times.