Not able to pass values back from method call

I have a Visual Studio 2010 Solution with 3 projects in it.  I do some backend processing in Project B and Project C, calling a method in each project from Project A.

I have several TextBoxes in Project A that I fill from the processing in Project C.  I pass those textboxes as parameters to the method in Project C, where I fill them in with data.

My problem is that the data does not get returned to the calling Project A.

Here is the call to the method in Project C from Project A:
GetBookInfo gbi = new GetBookInfo();
gbi.getBookInfo(mtbISBN.Text, tbTitle.Text, tbAuthor.Text, tbPub.Text);

Open in new window


Here is the code in Project C:
public bool getBookInfo(string isbn, string tbTitle, string tbAuthor, tbPub)  {

    parseReturnData(isbn, tbTitle, tbAuthor, tbPub);
return true;
}

private bool parseReturnData(string isbn, string title, string author, string pub)  {
   isbn = "12345";
   title = "blah, blah, blah";
   author = "me";
   pub = "hostPress";
  return true;

}

Open in new window

rmmarshAsked:
Who is Participating?
 
AndyAinscowFreelance programmer / ConsultantCommented:
>>I pass those textboxes as parameters

Please post that code - your code given only passes the contents into the function.
0
 
rmmarshAuthor Commented:
Andy:  I think that's the problem...  how do I pass the TextBoxes to the Project C so I can fill in the value and have it appear in Project A's main form?  Do I pass "(TextBox) tbName" to the method in Project C?
0
 
rmmarshAuthor Commented:
Thank you... that did it...
0
 
AndyAinscowFreelance programmer / ConsultantCommented:
Basically yes - pass the textbox itself (by it's name).
You need to also look at and understand reference types and value types of objects.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.