VB examples are not compiling

2 posts, 0 answers
  1. Ian
    Ian avatar
    1 posts
    Member since:
    May 2008

    Posted 21 May 2008 Link to this post

    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 

  2. Nikolay
    Admin
    Nikolay avatar
    1805 posts

    Posted 23 May 2008 Link to this post

    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
Back to Top