I want to get fields list of SPSiteItemCollection that limited by SPQuery view fields. for example I limited the view field which CAML query like this:
spQuery.ViewFields="<FieldRef ='TestFieldName' />";
and I executed query with this code and splist.GetItem(spQuery)
passed the result to another function and now I want to get current view fields list in this context I expect to get "TestFieldName" but I don't know how.
I know I can find all fields list with codes like this:
List<SPField> fields=listItem.Fields.Cast<SPField>().ToList();
or geting specific view by this code:
List<SPField> fields=list.Views["ViewName"].Fields.Cast<SPField>().ToList();
My question is: how can I get fields list of specific SPQuery view field?