Reputation: 969
I am calling a service, service is returning an object that contains a list. In this list number of elements are there like list[0],list1,etc...
Now I am trying to get value from the list, but it is not allowing to get the value from the list. Below is the code which I have written.
//calling a service
MarkelRate = Markel.MarkelService(username, password, dt, GR.State, classCode, GR.Territory, EachOcc, GeneralAgg, Deductible);
I am trying like this.
Upvotes: 1
Views: 77
Reputation: 60
Hemanth Try like this.
MarkelRate = Markel.MarkelService(username, password, dt, GR.State, classCode, GR.Territory, EachOcc, GeneralAgg, Deductible);
foreach (msu.markelcorp.com.Markel.MarkelClassGuide.GLClassRate item in MarkelRate.List)
{
string PrmiumRate = item.BaseRate.ToString();
}
Upvotes: 1