By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,569 Members | 1,615 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,569 IT Pros & Developers. It's quick & easy.

How to get attribute

P: n/a
Dear all,
if I have
<XmlElement("MULTITHREADED")> _Public m_multithreaded As Boolean

How do I get the attribute value at the run time?

I need something like

dim _attr as string=GetAttr(m_multithreaded,XmlElement)

Thanks alot,

Boni
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Boni" <oilia@nospam> schrieb
Dear all,
if I have
<XmlElement("MULTITHREADED")> _Public m_multithreaded As Boolean

How do I get the attribute value at the run time?

I need something like

dim _attr as string=GetAttr(m_multithreaded,XmlElement)

Example in a Form:

<System.Xml.Serialization.XmlElementAttribute("MUL TITHREADED")> _
Public m_multithreaded As Boolean

Private Sub Form_Load( _
ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles MyBase.Load

Dim atts As Object()

atts = Me.GetType.GetField("m_multithreaded").GetCustomAt tributes( _
GetType(System.Xml.Serialization.XmlElementAttribu te), False _
)

For Each att As System.Xml.Serialization.XmlElementAttribute In atts
'access att properties here
Next

End Sub
Armin

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.