📄 class1.cs
字号:
using System;
using System.IO;
using System.Net;
namespace WebPages
{
public class WebPagesApp
{
[STAThread]
public static void Main(string[] args)
{
string s = "http://www.microsoft.com";
Uri uri = new Uri(s);
WebRequest req = WebRequest.Create(uri);
WebResponse resp = req.GetResponse();
Stream str = resp.GetResponseStream();
StreamReader sr = new StreamReader(str);
string t = sr.ReadToEnd();
int i = t.IndexOf("<HEAD>");
int j = t.IndexOf("</HEAD>");
string u = t.Substring(i, j);
Console.WriteLine("{0}", u);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -