Advertisement
Guest User

Untitled

a guest
Dec 14th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. I have:
  2. public struct IntPoint
  3. {
  4. public long X;
  5. public long Y;
  6. ....
  7. }
  8. Which is part of another library (that I should not change).
  9.  
  10. I want to make a 'generic' class that would be able to handle arguments of both the above mentioned struct and System.Drawing.PointF. Like:
  11.  
  12. class SomeClass<T> where T : "something something IntPoint Or The Other One, PointF" << I know I can't do this in this manner
  13. {
  14. private T p;
  15.  
  16. void SomethingSomething(T q) { p = q; }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement