المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Playing with Enumerations



C# Programming
09-23-2009, 01:11 AM
Hi guys!

Maybe someone can help me with this:

I have a library C which controls a device and it's methods take enumerations as parameters.
Then I have a library B which references C and "wraps" the complex commands from library C in something useful and maintainable.
The last thing I have is an assembly A which does the UI stuff. It references ONLY library B.
Nevertheless B needs the values of the enumerations of C to control the device (and to fill comboboxes with the enum-Values)

I need a way to pass the information, which value of an enumeration is needed from A to B.
I do not want to reference C in A (that's how I would get the enumerations as well).

Which would be a good approach to solve this problem.

Help would really be appreciated!