Skip to content

Commit 4210f94

Browse files
committed
Update exception handling.
1 parent 2c6055f commit 4210f94

File tree

4 files changed

+176
-77
lines changed

4 files changed

+176
-77
lines changed

dotnetv4/IoT/Actions/HelloIoT.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public static async Task Main(string[] args)
3333

3434
var response = await iotClient.ListThingsAsync(request);
3535

36-
if (response.Things.Count > 0)
36+
if (response.Things is { Count: > 0 })
3737
{
3838
Console.WriteLine($"Found {response.Things.Count} IoT Things:");
3939
foreach (var thing in response.Things)

0 commit comments

Comments
 (0)