The name of the file is pretty much irrelevant: it is the name of the class (including the namespace) which is relevant.
The other thing which matters is whether
msg
is a static string or not. If it isn't, then you can only access it via an instance of the class that contains it - it doesn't exist in isolation, only as part of an instance of a class. Think car: you can't put a map in the glovebox of "a car", you have to put it in the glovebox of "this car", "that car" or "my car". The car is the class, "my car" is an instance.
Then you come to access level. From outside the class, you can only access
public
items (this is a lie, but the full story is more complex than you need at the moment). So the best way to do it is:
1) Within the project class, in the project.cs file, declare:
public string msg { get; set; }
This creates the
msg
string as a class level public property.
2) In Form1, declare an instance of the project class, and you can access it's
msg
property.
project myProject = new project();
myProject.msg = "Hello";
There are still a few things here you should change as far as naming conventions go (Classes should start with a Capital Letter, so it should be
Project
not
project
, Properties the same, plus they should have full names, rather than abreviations:
Message
rather than
msg
, but this should get you started.