Junior — Middle
Where is the class definition usually stored in programming?
sobes.tech AI
Answer from AI
In C#, a class definition is usually stored in a separate file with the extension .cs. By convention, the filename matches the class name, which makes navigation and maintenance easier. For example, a class User will be defined in a file User.cs.
// User.cs
public class User
{
public string Name { get; set; }
public int Age { get; set; }
}