Sorry, my editing mistake;
ApplicationData appData = new ApplicationData();
//Line should read (i.e. passing appData)
ProductInfo.GetListOfCurrentLoanProducts("5" , "200", appData );
ApplicationDataInfo.GetListOfCurrentItems(DateTime .Now , itemType,
appData );
int val = appData.ItemHeaders[0].itemId ;
"RAyRAy" <RA****@discussions.microsoft.com> wrote in message
news:F6**********************************@microsof t.com...
Are you sure? Cause GetListOfCurrentItems is a static method and has no
refrence to the instance called appData. It looks to me that the only time
there is any refrence to appData is during the constructor time. So check
this and see if it works:
ApplicationData appData = new ApplicatioinData();
int val = appData.ItemHeaders[0].itemID;
it should still work cause the 2nd line has nothing to do with appData and
the third line is a static method without any refrence to appData. Try it,
let me know.
RAyRAy
HuhOiC
"Mat Andrews" wrote:
Hi,
I'm comfused with this peice of code which I'm looking at. I can't
figure out how it works (and it does appear too);
ApplicationData appData = new ApplicationData();
ProductInfo.GetListOfCurrentLoanProducts("5" , "200",
ProductFactory);
ApplicationDataInfo.GetListOfCurrentItems(DateTime .Now ,
itemType, appData );
int val = appData.ItemHeaders[0].itemId ;
My question is how can appData be populated by the call to
GetListOfCurrentItems (which is appears to be upon return)? Surely, as
it is not passed by reference how can the values be used upon returning
from the call?
The call ApplicationDataInfo.GetListOfCurrentItems is a void function of
a sealed class referenced by the calling assembly. Within this function
the parameter appData is populated.
Can anyone shed any light as this is annoying me!
Cheers,
Mat