user3672132 user3672132 - 1 year ago 132 Question

How to convert lambda from C# to VB.NET?

Lambda expression:

public bool IsConnected => (bool?)DeviceInformation.Properties["System.Devices.Aep.IsConnected"] == true;

Answer Source

Doesn't look like a lamdba to me, just a typo with the =>

Public IsConnected As Boolean = (CType(DeviceInformation.Properties("System.Devices.Aep.IsConnected"), Nullable(Of Boolean)) = True)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download