user3672132 user3672132 - 3 months ago 13
Vb.net Question

How to convert lambda from C# to VB.NET

lambda expression:

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

Answer

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)
Comments