Hello all,
I have a generic list of messages, which I pass to a method by reference. The method uses one of the messages from the list and updates the message.
How do I get this message updated with a new text, when passing the entire list by reference?
e.g.
private int RetrieveAndProcessQueueEntityRows(
string sEntityCode,
string sMessageFIDs,
int iNumberToFetch,
ref List<Entity> oMessageList) {
////......
Message currMessage = null;
foreach (Message oMessage in oMessageList) {
if (oMessage.Message_UID == oPatientInfoEntityCurrent.MessageFID) {
currMessage = oMessage;
break;
}
}
So now I can use the currMessage object to do the required updates. But how do I update the List<Entity> oMessageList
with the currMessage
?
Thanks for all your help! - Lakus