title: C# implement similar properties within a class using a "template"
body: <p>I've been wondering for a time now - in c# is there a way to define a "template" for several properties within a class. Here is what I mean:
       Let's assume I have the following class</p>
  
  <pre><code>class MyCLass
  {
      public int  IntVal1 { get {...}; set{...} }
      public byte IntVal2 { get {...}; set{...} }
      ....
      public long IntValN { get {...}; set{...} }
  }
  </code></pre>
  
  <p>I did not write any specific implementation in the get and set accessors but the idea is that all these properties have very similar implementations - the difference may be that they operate on different members of the class which have different types, but as a whole they all look alike. </p>
  
  <p>My idea is to find a way to define some sort of (let's call it) "template" with some parameters probably that may be used to declare all these properties without the need to write the actual implementation of each and every one of them - maybe using attributes!?! </p>
  
  <p>I guess what I need is similar to a C macro.</p>
  
  <p>10x in advance</p>