**** Merged from MCS ****
[mono-project.git] / mcs / btests / Interface.vb
blob64f8e79e4ad89179885cbf1da03cbe187ef3ff45
1 Imports System
2 Interface I
3 Sub F()
4 End Interface
6 Class C
7 Implements I
9 Public Sub F() Implements I.F
10 End Sub
11 End Class
13 Module InterfaceTest
14 Sub Main()
15 Try
17 Dim x As C = New C()
18 x.F()
19 Catch e As Exception
20 Console.WriteLine("#A1:Interface:Failed-error creating instance of class implementing interface"+e.Message)
21 End Try
23 Try
24 Dim y As I = New C()
25 y.F()
26 Catch e As Exception
27 Console.WriteLine("#A2:Interface:Failed - error declaring varaibles of the interface")
28 Console.WriteLine(e.Message)
29 End Try
30 End Sub
31 End Module