Csharp/CSharp Tutorial/Network/HttpWebResponse

Материал из .Net Framework эксперт
Перейти к: навигация, поиск

To see the date on which a web site was last modified

using System;  
using System.Net;  
  
class MainClass {   
  public static void Main(string[] args) {  
    HttpWebRequest req = (HttpWebRequest)WebRequest.Create("http://www.nfex.ru");  
  
    HttpWebResponse resp = (HttpWebResponse) req.GetResponse();  
  
    Console.WriteLine("Last modified: " + resp.LastModified);  
  
    resp.Close();  
  }  
}