I made program, and i divided several functions(system_flow.cs,make_array.cs etc ...) to share the value of variables by using public static declaration.
But my teacher(programmer) said using public static to share the value of variables to share the variables is not good for program.
So can you tell me why it is not good for program?
Also is it mean that i should unite every functions for one class file?
i used public static like this way
private string NAME;
public string Name;
{
get
{
return this.NAME;
}
set
{
this.NAME = value;
}
- my teacher said the reason it is not good is
when people work together and someone modifies the public data then the program starts to screw up.