Frans, I've gone all over the System.Enum definitions. I think the root of the issue is that when you specify a parameter in a method call you are essentially supplying a type, but the FrameworkClass does not understand the type that is defined after it is built and shipped.
Any ideas? - John - -----Original Message----- From: Unmoderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Frans Bouma Sent: Wednesday, August 04, 2004 1:34 PM To: [EMAIL PROTECTED] Subject: Re: [ADVANCED-DOTNET] Enum as a Parameter Have you checked out the various methods of System.Enum? I think these can help you with what you want to accomplish.. Frans. -------------------------------------------------------------------- Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com My .NET Blog : http://weblogs.asp.net/FBouma Microsoft MVP (C#) -------------------------------------------------------------------- > How would one pass the enumeration into a method in C#? > > --- Application Code --- > [Flags()] > Public enum Stage{InProcess=1, Waiting=2, Busy=4, Available=8}; > > [Inside of a function] > base.MethodThatDoesStuff(Stage, Stage.InProcess); > > > --- Framework Code --- > [Inside the base object] > internal void MethodThatDoesStuff(System.Enum AnEnumeration){ > //Do Stuff > } > > I'm not looking to pass an enumeration value to the base > class via a method, that's the easy part, but I'm looking to > design a base class that has the ability to detect > enumerations defined by the classes that derive from it. > > The code pieces above do not work, but it is what I would > ideally like to do. > > Any ideas? > > John Lomnicki > > =================================== > This list is hosted by DevelopMentor(r) http://www.develop.com > Some .NET courses you may be interested in: > > > >>> Error in line 15 of ADVANCED-DOTNET.MAILTPL: unknown formatting > >>> command <<< > -> .NET Architecture and Design: Designing Distributed > Applications with <- > > > =================================== This list is hosted by DevelopMentor. http://www.develop.com Some .NET courses you may be interested in: Essential .NET: building applications and components with CSharp August 30 - September 3, in Los Angeles http://www.develop.com/courses/edotnet View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorŪ http://www.develop.com Some .NET courses you may be interested in: Essential .NET: building applications and components with CSharp August 30 - September 3, in Los Angeles http://www.develop.com/courses/edotnet View archives and manage your subscription(s) at http://discuss.develop.com