Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<blockquote> <p>Do you create a project per parent namespace and then reference that project dll in other projects?</p> </blockquote> <p>Not necessarily. It usually ends up that way because my libraries typically aren't very big but you'll notice Microsoft certainly doesn't do that. System.Web exists even if you don't include the System.Web reference. You just get more classes if you do. Indicating that the System.Web namespace is used in several different DLLs.</p> <blockquote> <p>Do you create one big class library and port that thing around (even if you only need 5% of the library)?</p> </blockquote> <p>Yes. Hard drive space is cheap, cheaper than maintaining redundant code.</p> <blockquote> <p>Or, do you just create one file and copy the code you need into that file; toting that file around into all the projects that you need to achieve a "plug and play" architecture (as bad as this seems)?</p> </blockquote> <p>It depends on the function. I'd usually place something like this in a snippet. For example a typical function that shows up in my web projects is something like:</p> <pre><code>void ShowErrorMessage(HtmlTableRow row, string message) { row.Cells.Clear(); row.Cells.Add(new HtmlTableCell()); row.Cells[0].InnerHtml = message; row.Cells.Attributes.Add("class", "error"); row.Visible = true; } </code></pre> <p>It's never seemed like a good candidate for a library function because then I'd have to pass in the CSS class I wanted to use and occasionally the colspan value for the cell. But you'll see some sort of implementation like this sitting in a few places in my web projects.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload