Link to home
Start Free TrialLog in
Avatar of allelopath
allelopath

asked on

C# class file name

In Java, the class name and the file name of the class must match.
In C#, this does not appear to be the case, ie I can have a file named MyClass.cs with:
public class NotMyClass {
}
Is this correct?
ASKER CERTIFIED SOLUTION
Avatar of Paul MacDonald
Paul MacDonald
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of allelopath
allelopath

ASKER

Is this often done?
or is it best practices to have the class and file name match?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial