enumerations

How do I use enumerations with XML-RPC and C#?

I'm using the Cook Computing XMLRPC framework in C#. I'm calling a remote function that expects an int. I want to use an enumeration in the client code instead of just calling the function with the digits hard-coded in the function parameters. The code compiles successfully, but during testing an XmlRpcUnsupportedTypeException is throw....

Traverse xml structure to determine if a certain text node exists

Alright I have an xml document that looks something like this: <xml> <list> <partner> <name>Some Name</name> <status>active</status> <id>0</id> </partner> <partner> <name>Another Name</name> <status>active</status> <id>1</id> </partner> </list> </xml> I ...

Singular or plural for enumerations?

Do you use singular or plural for enumerations? I think i makes best sense with plural in the declaration enum Weekdays { Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday } ... but I think it makes more sense with singular when using the type, e.g. Weekday firstDayOfWeek = Weekday.Monday; I...

How Char By Char Traversal is possible ?

When i apply IEnumerator and perform MoverNext() will it traverse like C-Style 'a' 'p' 'p' 'l' 'e' '\o' until it finds null character?I thought it would return the entire string.How does the enumeration work here? string ar = "apple"; IEnumerator enu = ar.GetEnumerator(); while (enu.MoveNext()) { Console.W...

Should I store my Enums at database level or in the application logic (.NET)?

Hi, I have a table, lets call it Objects. It has a predefined set of records looking like this: ObjectId ObjectName 1 Salmon 2 Trout 3 Seabass 4 Shark Etc.. So, this I would like to implement somehow as an enum. But what's the best way, implement it in the database creating tables for it or in the app...

Is there a way to iterate and reflect the member names and values contained in enumerations?

Let's say I have the following enum: public enum Colors { White = 10, Black = 20, Red = 30, Blue = 40 } I'm wondering if there is a way to iterate through all the members of Colors to find the member names and their values. ...

I am confused with Enumerations

If enums are used from jdk1.5 onwards , what was the use of java.util.Enumeration interface before jdk1.5 ? Can anybody help me explore this with an example please ? ...

I want to graph enumeration values (by their integer values) but have strings displayed in Silverlight Toolkit Chart control

In our application we allow users to chart enum values over time. We want the values plotted on the y-axis according to their integer values. However, we want the y-axis labelled with localized strings. And we'd like the "tooltip" diplayed when you hover over a plotted point to display a localized string. I thought this would be "simple...

Referring to a Enumeration Value type in a method signature

I would like to add a method to scala.Enumeration. My first approach was to try to extend it, but was bitten by this. My second approach was to try to define a method, and pass in the Enumeration - if that worked, I hoped to use an implicit conversion. I'm having a hard time preserving type with the return type of the method, however....

Listing all possible values for SOAP enumeration with Python SUDS

I'm connecting with a SUDS client to a SOAP Server whose wsdl contains many enumerations like the following: </simpleType> <simpleType name="FOOENUMERATION"> <restriction base="xsd:string"> <enumeration value="ALPHA"><!-- enum const = 0 --> <enumeration value="BETA"/><!-- enum const = 1 --> <enumeration value="GAMMA"/><!-- ...

Iterate through saved values of Bitwise Enumeration

Hi, I'm using a Bitwise Enum as a Datasource for a repeater control in which each line has a checkbox. When the user saves data, enum values corresponding to the checked boxes are saved into a single database field. However, when the user comes to edit the data, obviously I need to pre-populate the repeater with the existing values. I...