开发者

Why we use .class file in ASP.NET?

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 a开发者_StackOverflow中文版ny idea..so question is we do not use in ASP.net ? then where we will use?


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.


Probably, this is your company practice (or policy), since it's not wide spread practice. You should check this out with your team leaders

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜