How to List Directory Contents with FTP in C#?
问题 How to List Directory Contents with FTP in C# ? I am using below code to List Directory Contents with FTP it is returning result in XML format ,but i want only the name of directory not the whole content. How i Can do that ? public class WebRequestGetExample { public static void Main () { // Get the object used to communicate with the server. FtpWebRequest request = (FtpWebRequest)WebRequest.Create(\"ftp://www.contoso.com/\"); request.Method = WebRequestMethods.Ftp.ListDirectoryDetails; //