R
Ron
I have a windows form that uses several typed datasets which generates the
usual Designer code. I need to reference these objects elsewhere in my
code. I was successful (partially) in using reflection and field info:
System.Reflection.FieldInfo[] fi =
this.GetType().GetFields(System.Reflection.BindingFlags.Instance |
System.Reflection.BindingFlags.NonPublic |
System.Reflection.BindingFlags.Public);
for (int i = 0; i < fi.Length; i++)
{
System.Diagnostics.Debug.WriteLine(string.Format("{0}",
fi.FieldType));
}
This allows me to see each of the objects on the form which is good. My
question specifically is how do I reference those objects to store them in a
collection?
I'm particularily interested in the typed DataSet Objects, the typed
BindingSources, and the typed TableAdapters. The problem is that the
designer code resolves to a type of
Form1.EmployeeDataSetTableAdapters.EmployeeBaseTableAdapter causing a
problem when I want to store them in a collection.
Please help Im really stuck here.
Thank you!
Ron
usual Designer code. I need to reference these objects elsewhere in my
code. I was successful (partially) in using reflection and field info:
System.Reflection.FieldInfo[] fi =
this.GetType().GetFields(System.Reflection.BindingFlags.Instance |
System.Reflection.BindingFlags.NonPublic |
System.Reflection.BindingFlags.Public);
for (int i = 0; i < fi.Length; i++)
{
System.Diagnostics.Debug.WriteLine(string.Format("{0}",
fi.FieldType));
}
This allows me to see each of the objects on the form which is good. My
question specifically is how do I reference those objects to store them in a
collection?
I'm particularily interested in the typed DataSet Objects, the typed
BindingSources, and the typed TableAdapters. The problem is that the
designer code resolves to a type of
Form1.EmployeeDataSetTableAdapters.EmployeeBaseTableAdapter causing a
problem when I want to store them in a collection.
Please help Im really stuck here.
Thank you!
Ron