Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form1
- Public Function MyFunction() As Integer?
- Return Nothing
- End Function
- Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
- Dim o As Object = Me
- MsgBox(TypeName(Me)) ' Form1
- MsgBox(TypeName(o)) ' Form1
- MsgBox(TypeName(Me.MyFunction())) ' Nothing
- MsgBox(TypeName(o.MyFunction())) ' Nothing
- ' but
- MsgBox(TypeName(Me.MyFunction() + 0)) ' Nothing
- MsgBox(TypeName(o.MyFunction() + 0)) ' Integer
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement