Solved

send data when calling methods

Posted on 2009-07-04
4
195 Views
Last Modified: 2012-05-07
hi all,

I need to send a string when calling another method - something similar to events (sender, e)

thanks

d.
0
Comment
Question by:ingprokop
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 5

Expert Comment

by:iUsername
ID: 24776687
I have to admit I don't really understand the question.

Do you want to send a string as a parameter to another method ?!?!
0
 

Author Comment

by:ingprokop
ID: 24776693
exactly...
0
 
LVL 39

Accepted Solution

by:
abel earned 500 total points
ID: 24776895
What about:

// in your class
public void takeSomeString(string myString)
{
   // do something with the string
   System.Diagnostics.Debug.WriteLine(myString);
}
 
// in your form_load or whatever call it like this
 
takeSomeString("some string here");
 
// or like this:
 
string justAString = "hello world";
takeSomeString(justAString);

Open in new window

0
 

Author Comment

by:ingprokop
ID: 24777467
ah great, that's what I needed...
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

687 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question