RDLC (VS 2010) How to access nested class or arrays on DataObjects
Posted
by gerard
on Stack Overflow
See other posts from Stack Overflow
or by gerard
Published on 2010-03-01T11:09:35Z
Indexed on
2010/06/02
19:04 UTC
Read the original article
Hit count: 670
How can I access the TD.SubNumber property and Numbers[] on RDLC? I keep getting #Error on my expressions "=Fields!TD.Value.SubNumber" and "=Fields!Numbers.Value(0)".
public class TestData
{
TestSubData tdata = new TestSubData();
public TestSubData TD
{
get { return tdata; }
set { tdata = value; }
}
string m_Description;
public string Description
{
get { return m_Description; }
set { m_Description = value; }
}
int[] m_Numbers = new int[12];
public int?[] Numbers
{
get { return m_Numbers; }
}
}
public class TestSubData
{
int x;
public TestSubData()
{
}
public int SubNumber
{
get { return x; }
set { x = value; }
}
}
© Stack Overflow or respective owner