当前位置:首页 > 开发 > 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://www.pythonopen.com/?id=227

相关文章

C# 获取Windows系统目录

Environment.GetFolderPath(Environment.SpecialFolde...

C# 颜色算法

RGB转Dec    /// <summary>...

C# 热键

API     /// <summary>...

C# BackgroundWorker

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

C# double转为string并保留两位小数

在 C# 中,可以使用多种方式将 double 类型的数据转换为 string 类型并保留两位小数,...

C# Browsable(bool)

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