Hi Michael,
First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to expose the reference to a
typed DataSet instance to other projects. If there is any misunderstanding,
please feel free to let me know.
As far as I know, we cannot get the instance-name in design time. If you
need to get the instance name in another assembly at runtime, please try to
use classes in System.Reflection namespace. Here is an example for getting
types and member information from an assembly. HTH.
public static void ReflectOnAssembly(Assembly assem) {
WriteLine(0, "Assembly: {0}", assem);
// Find Modules
foreach (Module m in assem.GetModules()) {
WriteLine(1, "Module: {0}", m);
// Find Types
foreach (Type t in m.GetTypes()) {
WriteLine(2, "Type: {0}", t);
// Find Members
foreach (MemberInfo mi in t.GetMembers())
WriteLine(3, "{0}: {1}", mi.MemberType, mi);
}
}
}
private static void WriteLine(Int32 indent, String format,
params Object[] args) {
Console.WriteLine(new String(¡® ¡¯, 3 * indent) + format, arg
s);
}
For more information, please check the following link:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfSystemReflection.asp
Does this answer your question? If anything is unclear, please feel free to
reply to the post.
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."