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




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

Syntax

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

Parameters

label
A string representing the header label to remove.

Return Value

If the specified header line is present, this method returns the value of the removed header, 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 label is found matching the string label, that header line will be removed.

Some header labels 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 current status of the header.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

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