|
-
March 26th, 2010, 08:15 PM
#1
[RESOLVED] Generics question
I have a question about generics. I was wondering if there was a way to rewrite this:
class ByFirstNameComparer : IComparer<Person>
{
public int Compare(<Person> p1, <Person> p2)
{...}
}
To something like this:
class ByFirstNameComparer : IComparer<T> where T is Person
{
public int Compare(<T> p1, <T> p2)
{...}
}
.net 4.0? VS2010 Ultimate V10.0.30128.1 RC1Rel
Thanks,
Matthew
Tags for this Thread
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
|