How do I extract information from a FieldInfo object?
After much searching I found an example of how to set the margin settings in a Winforms.ReportViewer. Here is the basic code: Dim tip As Type = ReportViewer1.GetType Dim pr() As System.Reflection.FieldInfo = tip.GetFields(System.Reflection.BindingFlags.Instance Or System.Reflection.BindingFlags.NonPublic) Dim ps As New System.Drawing.Printing.PageSettings Dim x As System.Reflection.FieldInfo <set the property values of ps here> For Each x In pr If x.Name = "m_pageSettings" Then x.SetValue(ReportViewer1, ps) End If Next This much works. But how do I get information out of FieldInfo object x? (If I can set the info in one line of code I would expect to be able to do the opposite as well.)
July 28th, 2011 1:58pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics