You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you compile this code, Visual Basic shows the BC42328 warning for the second `AddHandler`statement because `OnSimpleComplete` doesn't match the `EventHandler` signature exactly.
35
+
When you compile this code, Visual Basic shows the BC42328 warning for the `AddHandler`statements that use relaxed delegate conversion.
66
36
67
37
## Why AddressOf appears to have "no effect"
68
38
@@ -74,70 +44,70 @@ However, `AddressOf` is still syntactically required in `AddHandler` and `Remove
74
44
75
45
## To correct this error
76
46
77
-
You have several options depending on your needs. Using the `FileProcessor` example from previously, here are the different ways to resolve the BC42328 warning:
47
+
You have several options depending on your needs. Using the `DocumentProcessor` example from previously, here are the different ways to resolve the BC42328 warning:
78
48
79
49
### Option 1: Assign to a variable first (preserves exact semantics)
80
50
81
51
```vb
82
-
PublicSubStartProcessing()
52
+
PublicSubDemonstrateHandler()
83
53
' Create delegate variable first - this eliminates the warning
0 commit comments