Click here to Skip to main content
15,908,455 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
what is <> and <T>, what is its use

in the following,

Class - Tuple<T1, T2, T3, T4, T5, T6, T7> Class
Class - Lazy<T> Class
Class - WeakReference<T> Class

Structure - ArraySegment<T> Structure

Interface - IObservable<T> Interface

Delegate - Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TResult> Delegate
Delegate - Action<T1, T2> Delegate


-----------

In above Class, Structure, Interface, Delegate, <> & <T> comes
What is it , what are its Uses ?

How to use these <T> effectively
Posted
Updated 1-Nov-12 23:18pm
v2
Comments
Sergey Alexandrovich Kryukov 2-Nov-12 1:08am    
The title and first line are not related with the text of the "question". It all looks like a gibberish. The question makes no sense.

'&' has different uses: Boolean and binary "and".

--SA

hi,

if you asking about <T> & <> for this,

we have use here <t> i.e. here used <t> for the Generic Purpose,here you can pass any type of parametor ,funtions i.e. return type of function ,there is no restrictions that you should use specific type of parametor,you can pass any generic type of parametor.

hope this will help you...
 
Share this answer
 
v2
hi friend,

Its uses more, but here is a snippet for you,

you should understand that the single ampersand operator is normally used for a 'bitwise AND' operation:
For example;
C#
(6 &amp; 2) = 2
(10 & 5) = 0
(20 & 25) = 16
(123 & 20) = 16


final result is:

Compare the binary representations of each of those.

C#
 110 &     010 =     010
   1010 &    0101 =    0000
  10100 &   11001 =   10000
1111011 & 0010100 = 0010000

In each case, a digit is 1 in the result only when it is 1 on both the left AND right side of the input.

regards
sarva
 
Share this answer
 
v2
These are template placeholders used in generics[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900