This is a migrated thread and some comments may be shown as answers.
VB Sample code in documentation
2 Answers 14 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
vb2ae
Top achievements
Rank 1
vb2ae asked on 02 Apr 2009, 10:34 AM
Any chance of fixing the VB sample code in the documentation.  It is full of errors.

Take this sample located here

http://www.telerik.com/help/openaccess-orm/introduction-to-linq.html

Dim words As String() = New String() {"Hello""world""of""Telerik""OpenAccess""ORM"}  
Dim result As var = words.Where(Function(w As ) w.Length > 4).[Select](Function(w As ) w)  
For Each word As String In result  
 Console.WriteLine(word)  
Next 
Console.ReadLine() 

There is no var type in visual basic and the function requires a data type

This is what the code should look tike

        Dim words As String() = New String() {"Hello""world""of""Telerik""OpenAccess""ORM"}  
        Dim result = words.Where(Function(w As String) w.Length > 4).[Select](Function(w As String) w)  
        For Each word As String In result  
            Console.WriteLine(word)  
        Next 
        Console.ReadLine() 


Thanks

2 Answers, 1 is accepted

Sort by
0
PetarP
Telerik team
answered on 03 Apr 2009, 02:09 PM
Hello vb2ae,
Yes you are correct that there are some problems with the VB samples inside the documentation. We are double checking them now just to be sure that there are no more occurrences like that. The changes will be published with our next update of the documentation. Your Telerik points were updated.

Best wishes,
PetarP
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
vb2ae
Top achievements
Rank 1
answered on 03 Apr 2009, 04:25 PM
Thanks
Tags
General Discussions
Asked by
vb2ae
Top achievements
Rank 1
Answers by
PetarP
Telerik team
vb2ae
Top achievements
Rank 1
Share this question
or