I am trying to get all the columns names using API. below is the code I am trying ,i need to iterate through the API object to get the Name of columns. But I am getting an error "ExactTarget.ExactTargetClient.APIObject object does not contain public definition of getenumerator" with this..
RetrieveRequest request = new RetrieveRequest();
request.ObjectType = "DataExtensionField";
request.Properties =
new string[]
{
"Name"
};
SimpleFilterPart sfp1 = new SimpleFilterPart();
String[] sfp1Values = { Start.Text };
sfp1.Property = "DataExtension.CustomerKey";
sfp1.SimpleOperator = SimpleOperators.equals ;
sfp1.Value = sfp1Values;
request.Filter = sfp1;
do
{
status = client.Retrieve(request, out requestID, out Results);
foreach (ExactTarget.ExactTargetClient.APIObject deo in Results)
{ foreach (ExactTarget.ExactTargetClient.DataExtensionField prop in deo)
{ string name = prop.Name;
}
}
How should I solve this? Is there any other way to do it.. Thanks in Advance.