C# code in a separate file: why?

  • Thread starter Thread starter vinnie
  • Start date Start date
V

vinnie

I'm learning how to build web application with asp.net 2.0, and while
the author of the book clearly invite the reader to place the code in
a separate file if building a web form, he place the code in the same
file if building a data form: why? It's not better to place the code
in a separate file all the time?

Thanks
 
Hi vinnie,

You are absolutly right : it is always a best practice to place the code
in a separate file. Actually, there is no good reason not to do it
simply because at the end (compilation i mean) all the code will be put
together (that what the partial keyword is here for)

vinnie a écrit :
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top