FtpExtensions.GetFtpDate Method

System.Net.FtpClient

Collapse image Expand Image Copy image CopyHover image
Tries to convert the string FTP date representation into a date time object

Namespace: System.Net.FtpClient
Assembly: System.Net.FtpClient (in System.Net.FtpClient.dll) Version: 1.0.5064.17461

Syntax

C#
public static DateTime GetFtpDate(
	this string date,
	DateTimeStyles style
)
Visual Basic
<ExtensionAttribute> 
Public Shared Function GetFtpDate ( 
	date As String,
	style As DateTimeStyles
) As DateTime
Visual C++
public:
[ExtensionAttribute]
static DateTime GetFtpDate(
	String^ date, 
	DateTimeStyles style
)

Parameters

date
Type: System..::..String
The date
style
Type: System.Globalization..::..DateTimeStyles
UTC/Local Time

Return Value

Type: DateTime
A date time object representing the date, DateTime.MinValue if there was a problem

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type String. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also