M
Mr. X.
Hello.
I need sample code of getting properties values of a specific object,
please.
Thanks
I need sample code of getting properties values of a specific object,
please.
Thanks
Hello.
I need sample code of getting properties values of a specific object,
please.
Indeed, I am using reflection,
but for the following code, I am doing a loop, that doesn't really work :
dim c as control
dim I ,j as integer ...
Dim prs() As System.Reflection.PropertyInfo
dim propName as string
dim propValue
For i = 0 To myPanel.Controls.Count - 1
c = myPanel.controls(I) ' one of the child controls is a dataGridView
prs = c.getType().getProperties()
for j = 0 to prs.count - 1
...
' I am looking for the published properties only.
if prs(j).canRead and prs(j).canWrite then
' for the datagridview, I am getting the propety
propName = prs(j).name
propValue = prs(j).getValue(c, nothing) ' *** here I get sometimes an
exception : TargetParameterCountException was unhandled.
parameterCountMismatch
....
Why may be the reason for the exception (The control : DataGridView.
property : Item) ?
Also, "item" is not a published property, that may seen on design time.
I want to see only properties, which are seen on design time.