| Visual Basic (Declaration) | |
|---|---|
<DescriptionAttribute("The number of milliseconds that this should wait for an operation to complete before returning a timeout error, if at all.")> <DefaultValueAttribute()> <CategoryAttribute("Behavior")> Public Property Timeout As Integer | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As Smtp Dim value As Integer instance.Timeout = value value = instance.Timeout | |
| C# | |
|---|---|
[DescriptionAttribute("The number of milliseconds that this should wait for an operation to complete before returning a timeout error, if at all.")] [DefaultValueAttribute()] [CategoryAttribute("Behavior")] public int Timeout {get; set;} | |
| Managed Extensions for C++ | |
|---|---|
[DescriptionAttribute("The number of milliseconds that this should wait for an operation to complete before returning a timeout error, if at all.")] [DefaultValueAttribute()] [CategoryAttribute("Behavior")] public: __property int get_Timeout(); public: __property void set_Timeout( int value ); | |
| C++/CLI | |
|---|---|
[DescriptionAttribute("The number of milliseconds that this should wait for an operation to complete before returning a timeout error, if at all.")] [DefaultValueAttribute()] [CategoryAttribute("Behavior")] public: property int Timeout { int get(); void set ( int value); } | |
Property Value
An integer specifying the maximum number of milliseconds to wait for responses to commands.The following example demonstrates properties of the Smtp component.
| Visual Basic | Copy Code |
|---|---|
' Be sure to import the namespace by putting "Imports Dart.PowerTCP.Mail" ' at the top of your class. ' Don't ask the server if the message is too large. Smtp1.AutoSize = False ' Only wait 10 seconds for a response Smtp1.Timeout = 10000 ' Send a message Smtp1.Server = "mail.test.com" Smtp1.Send("you@test.com", "me@test.com", "test", "test message" | |
| C# | Copy Code |
|---|---|
// Be sure to import the namespace by putting "using Dart.PowerTCP.Mail;" // at the top of your class. // Don't ask the server if the message is too large. smtp1.AutoSize = false; // Only wait 10 seconds for a response smtp1.Timeout = 10000; // Send a message smtp1.Server = "mail.test.com"; smtp1.Send("you@test.com", "me@test.com", "test", "test message"); | |
After connecting to a server, this value is used to establish the period of time to wait for server responses. During data transfer operations, a SocketException will be thrown if any data buffer transfer operation does not complete within the timeout period.
Target Platforms: Microsoft .NET Framework 2.0
Copy Code