-----------------------------------------------------------

New Message on cochindotnet

-----------------------------------------------------------
From: sajay
Message 1 in Discussion



This article 
was contributed by Bradley L. Jones. 

Environment: .NET, C# (future)

Generics are one of the new features that Microsoft has proposed be added to 
the C# language. While not a part of the current C# specifications as defined by 
ECMA or ISO, they could be in the future.

Generics are used to help make the code in your software components much more 
reusable. They are a type of data structure that contains code that remains the 
same; however, the data type of the parameters can change with each use. 
Additionally, the usage within the data structure adapts to the different data 
type of the passed variables. In summary, a generic is a code template that can 
be applied to use the same code repeatedly. Each time the generic is used, it 
can be customized for different data types without needing to rewrite any of the 
internal code

 public class Compare<ItemType, ItemType>
{
   public ItemType Larger(ItemType data, ItemType data2)
   {
      // logic...
   }

   public ItemType Smaller(ItemType data, ItemType data2)
   {
      // logic...
   }
}


.........................

 

[for more refer... http://www.codeguru.com/cs_syntax/BLJ-Generics.html]

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/cochindotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to