Go Back   RunUO - Ultima Online Emulation > Developer's Corner > Programming > C#

C# C# Discussion

Reply
 
Thread Tools Display Modes
Old 01-27-2008, 12:47 AM   #1 (permalink)
Master of the Internet
 
TMSTKSBK's Avatar
 
Join Date: Feb 2004
Location: NC/NC State Univ
Age: 23
Posts: 16,422
Default Generic delegates

Hello -

Trying to make a system where I use a lot of generics and delegates...mostly just for the using of stuff I don't know how to make well.

Anyhow, I need to make a delegate that accepts an argument that is generic.

i.e.: public delegate void aName( GenericType<T> t );

It's not terribly happy about this, since, obviously, T doesn't exist. What does I does?
__________________
Goodbye, folks.
TMSTKSBK is offline   Reply With Quote
Old 01-27-2008, 08:15 AM   #2 (permalink)
Forum Expert
 
arul's Avatar
 
Join Date: Jan 2005
Location: Hiding in your room.
Age: 21
Posts: 1,272
Send a message via MSN to arul
Default

public delegate void aName<T>( T t );

does this
__________________
arul is offline   Reply With Quote
Old 01-27-2008, 11:57 PM   #3 (permalink)
Master of the Internet
 
TMSTKSBK's Avatar
 
Join Date: Feb 2004
Location: NC/NC State Univ
Age: 23
Posts: 16,422
Default

Orly? Thanks. I'm'a try that tomorrow...sleep now.
__________________
Goodbye, folks.
TMSTKSBK is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5