.net源码调试 http://referencesource.microsoft.com/

其实关于。net源码调试 网上的资料已经很多了,我以前转载的文章有 VS2010下如何调试Framework源代码(即FCL) 和 如何使你的应用程序调试进.NET Framework 4.5源代码内部(适用B/S,C/S) 但是在实际调试的时候 偶尔遇到找不到源码的的cs文件, 很是郁闷。

今天仔细 看了一下 提示,决定直接访问 http://referencesource.microsoft.com/ 发现里面的code可以下载,我们只需下载下来,

 

在调试的时候打开就ok了。现在git上https://github.com/dotnet/ 基本都是core的code

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
源码dll: ComSvcConfig mscorlib PresentationBuildTasks PresentationCore PresentationFramework PresentationFramework.Aero PresentationFramework.Classic PresentationFramework.Luna PresentationFramework.Royale SMDiagnostics SMSvcHost svcutil System System.Activities System.Activities.Core.Presentation System.Activities.DurableInstancing System.Activities.Presentation System.AddIn System.AddIn.Contract System.ComponentModel.DataAnnotations System.Configuration System.Core System.Data System.Data.DataSetExtensions System.Data.Entity System.Data.Entity.Design System.Data.Linq System.Data.Services System.Data.Services.Client System.Data.Services.Design System.Data.SqlXml System.Drawing System.IdentityModel System.IdentityModel.Selectors System.IO.Log System.Management System.Messaging System.Net System.Numerics System.Runtime.Caching System.Runtime.DurableInstancing System.Runtime.Remoting System.Runtime.Serialization System.Security System.ServiceModel System.ServiceModel.Activation System.ServiceModel.Activities System.ServiceModel.Channels System.ServiceModel.Discovery System.ServiceModel.Internals System.ServiceModel.Routing System.ServiceModel.WasHosting System.ServiceModel.Web System.Transactions System.Web System.Web.ApplicationServices System.Web.DynamicData System.Web.Entity System.Web.Entity.Design System.Web.Extensions System.Web.Mobile System.Web.Routing System.Web.Services System.Windows.Forms System.Workflow.Activities System.Workflow.ComponentModel System.Workflow.Runtime System.WorkflowServices System.Xaml.Hosting System.Xml System.Xml.Linq UIAutomationClient UIAutomationClientsideProviders WindowsBase WsatConfig WsatUI XamlBuildTask
以下是将 Ruby 代码转换为 ASP.NET 源码的示例: ```csharp using System.Collections.Generic; using System.Net; using System.Text; var urls = new List<string> { "http://www.example.com/1.html", "http://www.example.com/2.html" }; var url = "http://data.zz.baidu.com/urls?site=https://3gqq.cn&token=LA8UpYR7d3zCQ2RL"; var request = WebRequest.Create(url) as HttpWebRequest; request.Method = "POST"; request.ContentType = "text/plain"; var postData = string.Join("\n", urls); var encoding = new UTF8Encoding(); var bytes = encoding.GetBytes(postData); request.ContentLength = bytes.Length; using (var requestStream = request.GetRequestStream()) { requestStream.Write(bytes, 0, bytes.Length); } using (var response = request.GetResponse() as HttpWebResponse) { var responseStream = response.GetResponseStream(); var reader = new StreamReader(responseStream, Encoding.UTF8); var responseString = reader.ReadToEnd(); // 处理响应内容 } ``` 这段代码使用了 .NET Framework 内置的 `HttpWebRequest` 类来向百度搜索引擎发送推送请求。其中,`urls` 和 `url` 分别表示待推送链接列表和推送请求的 URL。通过 `request.Method` 设置请求方法为 POST,`request.ContentType` 设置请求头中的 Content-Type 参数,`request.ContentLength` 设置请求体的长度,模拟了 Ruby 代码中的请求设置。最后,通过 `request.GetRequestStream` 方法获取请求流,将待推送链接列表写入请求流中,并通过 `request.GetResponse` 方法获取响应对象,从响应流中读取响应内容。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值