Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Wednesday, August 11, 2010 7:40 AM
Dear all,
what is meaning of Type in asp.net like List<T> or IComparable<T> then what is significant of 'T', I really confuse regarding thing
Thanks in Advance
All replies (3)
Wednesday, August 11, 2010 11:14 AM âś…Answered
hi
T means Type, for example if you want to create a list that has nothing but strings then this is how you do it.
List <string> listname=new List<string>();
if you try to store anything dat of of any other datatype in the list , you will get an exception.
To better understand the subject refer the topics on" Generics".
Wednesday, August 11, 2010 7:54 AM
T stands for type.t can be any class, interface. The type is passed as a parameter at the runtime.
Thursday, August 19, 2010 6:20 AM
Hi,
It Represents a strongly typed list of objects that can be accessed by index. Provides methods to search, sort, and manipulate lists.
The List(Of T) class is the generic equivalent of the arraylist class. It implements the i list of (T)generic interface using an array whose size is dynamically increased as required.
The List(Of T) class uses both an equality comparer and an ordering comparer.
Thanks