Set class property at runtime.

Posted by Lambo on Stack Overflow See other posts from Stack Overflow or by Lambo
Published on 2011-01-07T14:53:26Z Indexed on 2011/01/07 15:53 UTC
Read the original article Hit count: 248

Filed under:
|
|

I have a problem with my code, I cannot get it the 'test' to get the values im trying to assign to it.

rec = new Record(account, actual, commitment, costCentre, internalCostCentre);
webservicename.singleSummary test = new webservicename.singleSummary();

test.account = rec.Account;
test.actual = recc.Actual;
test.commitment = rec.Commitment;
test.costCentre = rec.CostCentre;
test.internalCostCentre = rec.InternalCostCentre;

webservicename.Feed CallWebService = new webservicename.Feed();

I am trying to get this to pop up in a dialog box to show that it is working, with something like test.account getting showed in the message box, not sure quite what the problem is.

My overall problem is I am trying to set the class porpert at runtime.

Any help is appreciated.

© Stack Overflow or respective owner

Related posts about c#

Related posts about binding