IRONSOFTWAREHOME
讀取 QR 碼型別
using IronQr;
using System.Drawing;
using System.Linq;

// Import an image containing a QR code
var inputImage = Image.FromFile("sample.jpg");

// Load the asset into a QrImageInput object
var imageInput = new QrImageInput(inputImage);

// Create a QR Reader object
var reader = new QrReader();

// Read the input and get all embedded QR codes
IEnumerable<QrResult> results = reader.Read(imageInput);

// Display the type of the first QR code found
Console.WriteLine($"The QR type is {results.First().QrType}");
Imports IronQr
Imports System.Drawing
Imports System.Linq

' Import an image containing a QR code
Dim inputImage As Image = Image.FromFile("sample.jpg")

' Load the asset into a QrImageInput object
Dim imageInput As New QrImageInput(inputImage)

' Create a QR Reader object
Dim reader As New QrReader()

' Read the input and get all embedded QR codes
Dim results As IEnumerable(Of QrResult) = reader.Read(imageInput)

' Display the type of the first QR code found
Console.WriteLine($"The QR type is {results.First().QrType}")
NuGet Download
PM > Install-Package IronQR
讀取 QR 碼型別

讀取 QR 碼型別

使用IronQR輕鬆驗證QR Code的格式,以智能化處理多種不同格式的QR Code作為輸入。 IronQR 通過 QrResult.QrType 曝露檢測到的符號學,提供應用程式所需的資訊,以根據其格式驗證、路由或記錄掃描到的程式碼。

閱讀QR Code型別的5步指南

  • using IronQr;
  • QrImageInput imageInput = new QrImageInput(Image.FromFile("sample.jpg"));
  • QrReader reader = new QrReader();
  • IEnumerable<QrResult> results = reader.Read(imageInput);
  • Console.WriteLine($"The QR type is {results.First().QrType}");

程式碼說明

包含QR Code的圖像從磁碟中載入並包裝在 QrImageInput 物件中。 QrReader 實例掃描輸入並返回QrResult 物件的集合,每個檢測到的QR Code都有一個。 在結果上存取 QrType 時,返回識別檢測到的符號學的字串,例如標準的QR Code或其他支持的格式。

探索如何使用IronQR閱讀QR Code型別。

準備好開始了嗎?

Nuget Downloads 74,386版本:2026.9剛剛發布

Key in blue circle

立即免費取得 30 天試用金鑰

Your trial license will be sent to your email address

無任何限制。100% 解鎖。無需信用卡。

bullet_checked無需信用卡或建立帳號無任何限制。100% 解鎖。無需信用卡。
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
預約您的免費現場演示
Booking Badge

受到全球數百萬工程師的信賴

Iron Software的客戶標誌
獲取您的無義務諮詢
填寫以下表單或發送電子郵件至sales@ironsoftware.com
您的詳細資訊將始終保密。
受到全球數百萬工程師的信賴
Iron Software的客戶標誌
立即獲取您的30天試用金鑰
無需信用卡或帳戶建立