Why we use .class files ASP.net?
Cant we use multiple classes as inline in the default.aspx.cs (codebehind) ?
haha..yea i dont have any idea..so question is we do not use in ASP.net ? then where we will use?
Why we use .class files ASP.net?
Cant we use multiple classes as inline in the default.aspx.cs (codebehind) ?
haha..yea i dont have any idea..so question is we do not use in ASP.net ? then where we will use?
Probably, this is your company practice (or policy), since it's not wide spread practice. You should check this out with your team leaders
Of course we can. Also we can write all project in one file. But this will kill you (or your co-workers will).
Have you ever tried to work with files xxxx lines long? It's a nightmare. It's very hard to find something there. And if you work in team and one of team members modifies some code in this file and you are editing it at the same moment - you'll get a problem with changes merging.
It's much more easy to navigate classes in file tree. "One class per file" - use this as a mantra.
And I don't get your joke about .class files. In asp.net usually used .cs, .aspx and ascx files.