I'm using VB.NET in Visual Studio 2010. Today I encountered two things which are baffling me. Referring to the code below, can someone explain:
1. Why don't I get a syntax error on the Console... line? I was expecting the error "Class System.Data.DataTable cannot be indexed because it has no default property.", but I'm not getting it. Why?
2. When I right click on "Item" and choose "Find All References", the results say "No references available for this item.". Why? There is clearly one reference.
-TC
Code:Module Module1 Sub Main() Dim DataTable1 As New System.Data.DataTable DataTable1.Columns.Add(New System.Data.DataColumn) DataTable1.Rows.Add("Value1") Console.WriteLine(DataTable1(0).Item(0)) End Sub End Module


LinkBack URL
About LinkBacks




Reply With Quote





Bookmarks