How can I get the values for an enumeration if I am using SOAP or the .NET SDK ?
Summary
With .NET, you can make use of the Enum class and use the method GetNames to get the array of the names of the constants in a specified enumeration.
Detailed Description
Here is a C# example that retrieves the list of HitCounter values:
using System; using eBay.Service.Call; using eBay.Service.Core.Sdk; using eBay.Service.Util; using eBay.Service.Core.Soap;
namespace SDKSamples {
public class SDKSamples {
public void GetEnumValues() { string[] counters = Enum.GetNames(typeof(HitCounterCodeType)); //iterate over the array for (int i =0; i < counters.Length; i++) { //iterate over the array and access the value using counters[i] }