Hi,
I have the following app.config file:
<configuratio n>
<system.diagnos tics>
......
</system.diagnost ics>
<mysection name="myname">
<role name="ana"></role>
</mysection>
</configuration>
I would like to read the value for name ("ana").
I created the following class:
Public Class MyRole
Inherits System.Configur ation.Configura tionElement
Friend ElementName As String = "role"
<System.Configu ration.Configur ationProperty(" name",
isrequired:=Tru e)Public ReadOnly Property name() As String
Get
Return Ctype(Me("name" ),String)
End Get
End Property
End Class
When I use the class:
Dim aRole as new myrole
msgbox aRole.name
shows an empty string.
Please help.
Thanks,
Carly
I have the following app.config file:
<configuratio n>
<system.diagnos tics>
......
</system.diagnost ics>
<mysection name="myname">
<role name="ana"></role>
</mysection>
</configuration>
I would like to read the value for name ("ana").
I created the following class:
Public Class MyRole
Inherits System.Configur ation.Configura tionElement
Friend ElementName As String = "role"
<System.Configu ration.Configur ationProperty(" name",
isrequired:=Tru e)Public ReadOnly Property name() As String
Get
Return Ctype(Me("name" ),String)
End Get
End Property
End Class
When I use the class:
Dim aRole as new myrole
msgbox aRole.name
shows an empty string.
Please help.
Thanks,
Carly