PowerTCP Mail for .NET
ToString Method
See Also  Example Send comments on this topic.
Dart.PowerTCP.Mail Namespace > Invoke Class : ToString Method




Returns the entire request/response pair.

Syntax

Visual Basic (Declaration) 
Public Overrides Function ToString() As String
Visual Basic (Usage)Copy Code
Dim instance As Invoke
Dim value As String
 
value = instance.ToString()
C# 
public override string ToString()
Managed Extensions for C++ 
public: string* ToString(); override 
C++/CLI 
public:
String^ ToString(); override 

Return Value

A string value representing the entire request/response pair.

Example

The following example demonstrates a simple rename.
Visual BasicCopy Code
' Create Invoke object, which will contain request/response data
Dim invoke As Dart.PowerTCP.Ftp.Invoke

' Call Rename. Invoke object will contain request/response data
Try
   invoke = ftp1.Rename("aaa.txt", "zzz.txt")
' ProtocolException thrown if bad response received from server
Catch FTPEx As Dart.PowerTCP.Ftp.ProtocolException
   Debug.WriteLine("Rename unsuccessful")
   Debug.WriteLine(FtpEx.ToString())
   Exit Sub
End Try  

' If it gets here, Rename was successful
Debug.WriteLine("Rename successful")

' Request sent and Response received
Debug.WriteLine("Response/response " + invoke.ToString())
C#Copy Code
//Create Invoke object which will contain request/response data
Dart.PowerTCP.Ftp.Invoke invoke;

// Call Rename
try
{
    invoke = ftp1.Rename("aaa.txt", "zzz.txt");
}
// ProtocolException thrown if bad response received from server
catch(Dart.PowerTCP.Ftp.ProtocolException FTPex)
{
    Debug.WriteLine("Rename unsuccessful");
    Debug.WriteLine(FTPEx.ToString());
    return;
}

// If it gets here, Rename was successful
Debug.WriteLine("Rename successful");

// Request sent and response received
Debug.WriteLine("Response/response " + invoke.ToString());

Remarks

This method returns the entire request/response pair, with additional formatting.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

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