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

C#解析Torrent获取磁力链

C#4年前 (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# 延时命令

方法1System.Threading.Thread.Sleep(1000);缺点:如果在主线程使用...

C# ArrayList

添加的成员可以是任意类型    ArrayList arra...

C# 计算平年闰年

一个年份整除4取余,如果有余数,则为平年,如果没有余数,则是闰年。但如果是这个年份是100的倍数,则...

C# 跳出foreach循环

在 C# 中,如果你想在 foreach 循环内部提前跳出当前这一轮循环,继续执行下一轮循环,可以使...

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

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

C# Browsable(bool)

在编程中(比如常见的 C# 语言在开发 Windows Forms 等应用程序时),Browsabl...