title: C# delegate and attributes syntax question
body: <p>I have a dictionary which is of type
  Dictionary [string,handler_func]
  where<br>
  handler_func is a delegate of type</p>
  
  <pre><code>public delegate void HANDLER_FUNC(object obj, TcpClient client);
  </code></pre>
  
  <p>now I have an attribute class like so</p>
  
  <pre><code>[AttributeUsage(AttributeTargets.Method)]
  public class MessageHandlerAttribute : Attribute
  {
  
      public MessageHandlerAttribute(string s1, HANDLER_FUNC hf)
      {
          s1 = name;
          msgtype = hf;
      }
      private string name;
      public string HandlerName
      {
          get { return name; }
          set { name = value; }
      }
  
      private HANDLER_FUNC msgtype;
      public HANDLER_FUNC MessageName
      {
          get { return msgtype; }
          set { msgtype = value; }
      }
  
  }
  </code></pre>
  
  <p>The basic idea is I apply this attribute to a method in a class and somewhere I use reflection to fill up the Dictionary above</p>
  
  <p>problem is unless this method is static the atrribute is not working
  so  </p>
  
  <pre><code>[MessageHandlerAttribute("HandleLoginResponse",HandleLoginResponse)]
  private void HandleLoginResponse(object obj, TcpClient client)  
  </code></pre>
  
  <p>is causing the standard need an object thing<br>
  So what are my options ( i do not want the handler method to be static )
  Thanks </p>