There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
vb.net Ambigious error for public object NotificationCode
When using ManagedWifi as a project within a VB.net solution, you will receive an ambigious error when you try to reference the public object NotificationCode in VB code. This is due to the declaration of these two items below and the fact that VB is case
insensitive. To fix this easily, alter the definition of the object.
public int notificationCode;
public object NotificationCode
Example code in VB that throws the error:
Select Case DirectCast(notifyData.notificationCode, Wlan.WlanNotificationCodeMsm)
To rectify the situation, I changed the definition in Interop.cs from public object NotificationCode to:
public object NotificationCodeObj
Once done I rebuilt the ManagedWifi solution and my code in VB became this:
Select Case DirectCast(notifyData.notificationCodeObj, Wlan.WlanNotificationCodeMsm)