Advertisement
Guest User

Untitled

a guest
Dec 6th, 2016
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. public static T Content<T>(this HttpResponseMessage response)
  2. {
  3. var content = (ObjectContent<T>) response.Content;
  4. return (T) content.Value;
  5. }
  6.  
  7. MyContent content = response.Content();
  8.  
  9. MyContent content = response.Content<MyClass>();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement