fork download
  1. REM http://i...content-available-to-author-only...e.com/hIFzL
  2.  
  3. Option Explicit On
  4. Option Strict On
  5. Option Compare Binary
  6.  
  7. Public Class Test1(Of T)
  8. Public Function Test11(t1 As T) As T
  9. Return t1
  10. End Function
  11.  
  12. Public Shared Function Test12(t1 As T) As T
  13. Return t1
  14. End Function
  15. End Class
  16.  
  17. Public Class Test2
  18. Public Shared Function Test21(Of T)(t1 As T) As T
  19. Return t1
  20. End Function
  21. End Class
  22.  
  23. Public Class Main
  24. Public Shared Sub Main()
  25.  
  26. REM OK
  27. Dim a As Integer = (New Test1(Of Integer)).Test11(5)
  28.  
  29. REM OK
  30. Dim b As Integer = Test2.Test21(Of Integer) (5)
  31.  
  32.  
  33. REM NG
  34. Dim c As Integer = Test1(Of Integer).Test12(5)
  35. End Sub
  36. End Class
Compilation error #stdin compilation error #stdout 0.05s 13192KB
stdin
compilation info
Visual Basic.Net Compiler version 0.0.0.5914 (Mono 2.4.2 - r)
Copyright (C) 2004-2008 Rolf Bjarne Kvinge. All rights reserved.


/home/d8NCgg/prog.vb (34,27) : Error VBNC30451: Could not resolve the name 'Test1'
There were 1 errors and 0 warnings.
Compilation took 00:00:00.9114240
stdout
Standard output is empty