title: C# share code between classes
body: <p>In Visual Studio 2008 using C#, what is the best way to share code across multiple classes and source files?  </p>
  
  <p>Inheritance is not the solution as the classes already have a meaningful hierarchy.  </p>
  
  <p>Is there some neat feature that's like a C include file that let's you insert code anywhere you want in another class?</p>
  
  <p>EDIT:</p>
  
  <p>ok, i guess we need a concrete example...</p>
  
  <p>There are several hundred classes in the domain with a well thought out class heirarchy.  Now, many of these classes need to print.  There is a utility printer class that handles the printing.  Let's say there are 3 different print methods that are dependent on the class that is being printed.  The code that calls the print method (6 lines) is what I'm trying to avoid copying and pasting across all the different client class pages.  </p>
  
  <p>It'd be nice if people wouldn't assume they knew more about the domain that the op - especially when they specifically mention techniques that don't fit...</p>