This is a migrated thread and some comments may be shown as answers.

VB examples are not compiling

1 Answer 54 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ian
Top achievements
Rank 1
Ian asked on 22 May 2008, 12:54 AM
Is there something I just don't know about VS or has anyone else run across this problem?

C# is a language that is case Senstive, while VB is not. In C# you can have a property name foo and a getter Setter name Foo and there is no problem. In VB8 however, this is illegal.

Usually private variable might be named _foo and the getter/setter is is Foo(or foo).

Am I daft? What am I missing? I have been through the .chm example and now the online version as well and they both show vb code that will not compile due to the reason I am talking about.

Here is an excerpt from the help file this WILL NOT COMPILE under VB unless panelElement is named something like _panelElement . Is Telerik missing this point or am I ingorant of something?

        Private panelElement As MyPanelElement 
 
        Public Sub New() 
            Me.UseNewLayoutSystem = True 
            Me.AutoSize = True 
        End Sub 
        Public ReadOnly Property PanelElement() As MyPanelElement 
            Get 
                Return Me.panelElement 
            End Get 
        End Property 

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 23 May 2008, 03:29 PM
Hello Ian,

Thank you for bringing this to our attention.

You are correct. This is a mistake in the documentation and it will be corrected for one of our future releases.

If you have additional questions, feel free to contact me.

Greetings,
Nikolay
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
General Discussions
Asked by
Ian
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or