PowerTCP Mail for .NET
Remove(HeaderLabelType) Method
See Also  Example Send comments on this topic.
Dart.PowerTCP.Mail Namespace > MailHeader Class > Remove Method : Remove(HeaderLabelType) Method




type
A HeaderLabelType representing the header label to remove.
Remove a header line from the MailHeader collection.

Syntax

Visual Basic (Declaration) 
Public Overloads Function Remove( _
   ByVal type As HeaderLabelType _
) As String
Visual Basic (Usage)Copy Code
Dim instance As MailHeader
Dim type As HeaderLabelType
Dim value As String
 
value = instance.Remove(type)
C# 
public string Remove( 
   HeaderLabelType type
)
Managed Extensions for C++ 
public: string* Remove( 
   HeaderLabelType type
) 
C++/CLI 
public:
String^ Remove( 
   HeaderLabelType type
) 

Parameters

type
A HeaderLabelType representing the header label to remove.

Return Value

If the specified header line is present, this method returns the removed header value, without the CRLF. If the specified header line is not present, this method returns null.

Example

The following example demonstrates
Visual BasicCopy Code
' Be sure to import the namespace by putting "Imports Dart.PowerTCP.Mail"
' at the top of your class.
C#Copy Code
// Be sure to import the namespace by putting "using Dart.PowerTCP.Mail;"
// at the top of your class.

Remarks

Use this method to remove a header label from the MailHeader collection. If a header is found matching the HeaderLabelType label, that header label will be removed.

Some header lines are encapsulated by high-level properties. For example, the "Subject:" header line is also encapsulated by the MessageStream.Subject property. If a header line is removed that is also encapsulated by a high-level property, the value of the high-level property will be changed to reflect the header.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 3.2
© 2010 Dart Communications. All Rights Reserved.