Solved

send data when calling methods

Posted on 2009-07-04
4
189 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
  • 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Bit flags and bit flag manipulation is perhaps one of the most underrated strategies in programming, likely because most programmers developing in high-level languages rely too much on the high-level features, and forget about the low-level ones. Th…
Introduction                                                 Was the var keyword really only brought out to shorten your syntax? Or have the VB language guys got their way in C#? What type of variable is it? All will be revealed.   Also called…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now