当前位置:首页 > 开发 > C# > 正文内容

C#解析Torrent获取磁力链

C#3年前 (2022-10-24)

NuGet添加 MonoTorrent

using MonoTorrent;
string file = @"D:\下载\5.torrent";
Torrent torrent = Torrent.Load(file);
Console.WriteLine("magnet:?xt=urn:btih:" + torrent.InfoHash.ToHex());
Console.ReadLine();
magnet:?xt=urn:btih:EA6380C88E8B58096B0100E6F0239800BF968848



转载请注明出处。

本文链接:http://pythonopen.com/?id=227

相关文章

在 C# 中实现类似于 Windows 资源管理器的“名称”排序方式

要在 C# 中实现类似于 Windows 资源管理器的“名称”排序方式,你需要考虑以下几点:1. 不...

C# 缩减代码量的一些方式

static void Main() { Thread thre...

C# BackgroundWorker

1.概述BackgroundWorker是一个在 WinForms 应用程序中用于简化在后台线程执行...

C# [OnPaint]和[OnPaintBackground]的区别

OnPaint和OnPaintBackground的主要功能区别OnPaint:OnPaint方法主...

C# 类接口

定义接口是一种抽象类型,它定义了一组方法签名(方法名称、参数列表和返回类型),但没有方法体。接口用于...

C# BackgroundWorker,在DoWork里更新控件内容

一般情况下不可以直接在BackgroundWorker的DoWork事件中更新 UI 控件在Back...