title: Generic Method Taking A Type and Returning Instance of that Type?
body: <p>I have a bunch of models which have the same properties - greenPeople, bluePeople, etc. For each of these, I have a controller, and in the post, I push their picture to some server and make a SQL entry describing the entry. Actually, my models are GreenPeoplePicture, BluePeoplePicture, etc. </p>
  
  <p>So I have something like:</p>
  
  <pre><code>GreenPeoplePicture greenPeoplePicture = new GreenPeoplePicture(); 
  greenPeoplePicture.Name = "blah"
  greenPeoplePIcture.Date = DateTime.UtcNow;
  </code></pre>
  
  <p>etc. Once it's filled out I stream to the remote server and then save "greenPeoplePicture" to the GreenPeoplePictures table. I want to write a generic method for this. I can't wrap my head around how to pass the type itself without passing any variable, since I want to do:</p>
  
  <pre><code>GreenPeoplePicture greenPeoplePicture = new GreenPeoplePicture(); 
  </code></pre>
  
  <p>in the method, and also have the return type be <code>GreenPeoplePicture</code>. I am sure this post is tantamount to "I can't code and don't understand generics," but I tried - at least tell me whether or not it's possible. MSDN and tutorialspoint aren't much help. </p>