title: Is it appropriate to use extension methods on types that you own?
body: <p>I have the following classes in my solution with the <code>Request</code> class being allowed to create <code>Response</code> instances:</p>
  
  <pre><code>public class Request
  {
      public Guid Id {get;} 
  
      public int UserId {get;}
  
      public string SomeInfo {get;}
  
      public Request(Guid id, int userId, string someInfo)
      {
          Id = id;
          UserId = userId;
          SomeInfo = someInfo;
      }
  
      public Response GetResponse(string content)
      {
          return new Response(requestId, content);
      }
  }
  
  public class Response
  {
      public Guid Id {get;}
  
      public Guid RequestId {get;}
  
      public string Content {get;}
  
      public Response(Guid requestId, string content)
      {
           Id = Guid.NewGuid();
           RequestId = requestId;
           Content = content;
      }
  }
  </code></pre>
  
  <p>Let's say I remove the <code>GetResponse</code> method and move its code into an extension method, like this:</p>
  
  <pre><code>public static class RequestExtensions
  {
       public static Response GetResponse(this Request request, string content)
       {
             return new Response(request.Id, content);
       }
  }
  </code></pre>
  
  <p>Is it an appropriate use of the extension methods? I understand the need of those in the context where you do not have access to the type. But does that make sense to use an extension method on a type I do own?</p>