I inherited a small Windows-based program written in C # that uses a constant (see below). I need to change this program, so "PROPERTY_NAME" can be "tasks" and "career".
private const string PROPERTY_NAME = "jobs";
I assume that the constant is not intended to change, so I need to change this. The line above is set once at the beginning of the class file, and then PROPERTY_NAME is used in this file.
In the main form, I would like to add two switches 1, called "tasks", and one - "career", and then change the PROPERTY_NAME file in the class file based on the selected one. Do I need to pass switch status to a method in a class file? I remember reading that I can’t just read the value of the switch from the class file.
Thanks so much for your advice.
Jane
source
share