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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.