hmk
hmk

Reputation: 969

How to get the value from the list with in the object

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);

enter image description here

I am trying like this.

enter image description here

Upvotes: 1

Views: 77

Answers (1)

vidya
vidya

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

Related Questions