I am building a console app using c# express edition. I'm trying to use a variable's value in a class that is also in another class. The class that it originates in is where the logic and input validation is. I am then trying to pass the variable(or it's value) to another class that contains my database code.This is where I reference it to write the values to the database.
I get an error message that says; 'The name "variable name" does not exist in the current context.' The variables are declared and used in the class where they originate.
I am assuming that I need the other class to inherit the varaible and it's value. I am not sure if inheritance is the correct
way to go about this. Does anyone have any suggestions
.......................................................................................thanks