2005-01-31 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mcs / mbas / Test / rerrors / Test / AssignmentStatements1.vb
1 ' ErrorMessage: System.ArrayTypeMismatchException: Attempted to store
2 ' an element of the incorrect type into the array.
3                                                                                 
4 Imports System
5 Imports Nunit.Framework
6                                                                                 
7 <TestFixture> _
8 Public Class AssignmentStatements1
9                                                                                 
10                 <Test, ExpectedException (GetType (System.ArrayTypeMismatchException))> _
11                 Public Sub TestArrayTypeMismatch ()
12                         Dim sa(10) As String
13                         Dim oa As Object() = sa
14                         oa(0) = Nothing
15                         oa(1) = "Hello "
16                         oa(2) = "World"
17                         oa(3) = New Date(2004, 12, 7)
18                                                                                 
19             End Sub
20 End Class
21
22
23
24
25
26
27
28
29