|
-
Jan 19th, 2012, 04:55 AM
#3
Re: C# generic constraint
Actually, I think I may have missed the main point of your question. I think you were asking if it is possible to specify that the generic type parameter satisfies ANY of the specified constraints. The answer is no. If there are multiple constraints then the generic type parameter must satisfy ALL of them. To handle multiple types like that you would have to overload the method.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|