Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

public class variable in other project

Status
Not open for further replies.

gcole

Programmer
Aug 2, 2000
390
US
I have a folder watcher solution made up of several projects. How do I get to a variable (file name) from one project to another?
 
It much depends on what kind of projects you have. If you want to pass something between 2 processes (EXE application for example), you'll need to use on of those many interprocess communication methods (simplest being a file or registry entry). If you need to communicate between EXE and DLL, then you can simply use exported function calls to set or return the file name.
As said - it much depends on what you use and need.

------------------
When you do it, do it right.
 
I ended up passing it from function to function. Yes, I am old school programming.
 
This whole question doesn't make sense...

If you have a local variable that you need to pass to something else to make it do something, then that's what you do.



public double CalculateTax(double amt)
{
return (amt * 0.15);
}

public void ShowCost()
{
double cost = 10.99;
double tax = CalculateTax(cost);
}

How is this old skool?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top