1 Partial Class _Default
2 Inherits System.Web.UI.Page
3 Public Function Ohjoy(ByVal X As Integer) As Integer
4 Dim theClass As New Class1 '= New Class1()
6 theClass.myBaby(0).GetName(0) = "Hello" 'Property Chars is read only'
7 Return 1
8 End Function
I have a first class named "Class1". I have a second class named "Class2" Class2, is a member of class 1,
and is implemented as an array of objects of type Class 2.
If I try and call the Accessor GetName() my hard coded value "Hello" in my accessor is not returned? Only
an alpha character like "T"
Also if I try and assigne a value using the setter GetName() it does not work, and the compiler gives me
an error message "property Chars is ReadOnly? Does anyone know what is wrong in my code? Line 6 above
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Public Class Class1
Dim bs As Integer
Public myBaby() As Class2
Public myB As Class2
Public Function ReSize(By
View Complete Post