how do u define generics and how can it be applied in the application

Posted by Shubhashree under Regular Expressions on 2/26/2010 | Views : 1318 | Status : [Member] | Replies : 2
how do u define generics and how can it be applied in the application




Responses

Posted by: Vuyiswamb on: 2/26/2010 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Look at this
http://msdn.microsoft.com/en-us/library/ms379564%28VS.80%29.aspx

http://msdn.microsoft.com/en-us/library/0x6a29h6.aspx

Thank you for Posting at Dotnetfunda

Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

Shubhashree, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Abhi2434 on: 2/26/2010 [Member] [Microsoft_MVP] [MVP] Silver

Up
0
Down
Simple


public class MyClass<T> where T : class
{
// here you can access T.

}


Or for methds :
public void getType<T>(T obj)

{
}


Cheers

www.abhisheksur.com

Shubhashree, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response