Passing a Business Object as a parameter and want to change the Calling Business Object


Author
Message
Ger Cannoll
Ger Cannoll
Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)
Group: StrataFrame Users
Posts: 430, Visits: 507
I am trying to pass a Business Object as a parameter to a routine, and adjust details on the calling Buisness Object

So a simplified version of my code is:    

BoSetDefaults(ref myBO)


My method is:
public static void BoSetDefaults(ref BusinessLayer myBO)
{   myBO["STATE"]= "NY";} 
  

The compliler is objecting that myBO is readonly.

Is there a way to amend the Calling Business Object in the Called Method. If I take out the Call By reference, just the copy that is called gets updated, but I want it to percolate back to the Calling Business Object
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search