diff --git a/sample/csharp/main.csx b/sample/csharp/main.csx index 684da6fe5..5a42d97a8 100644 --- a/sample/csharp/main.csx +++ b/sample/csharp/main.csx @@ -10,7 +10,7 @@ var userPath = Environment.CurrentDirectory; var toolkit = new MaaToolkit(init: true, userPath: userPath); // Equivalent to `toolkit.Config.InitOption(userPath);` var adbDevices = toolkit.AdbDevice.Find(); -if (!adbDevices.IsEmpty) +if (adbDevices.MaaSizeCount < 1) throw new InvalidOperationException("No ADB device found."); // Remember to dispose tasker, controller and resource.