什么是<>和< T>的用途是什么 [英] what is <> and <T>, what is its use

查看:445
本文介绍了什么是<>和< T>的用途是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是<>和< T>的用途是什么

在下面,

类-元组< T1,T2,T3,T4,T5,T6,T7>类
类别-懒惰T类
类别-WeakReference< T>类

结构-ArraySegment T结构

接口-IObservable T界面

代表-Func< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,TResult>委托
委托-动作< T1,T2>委托


-----------

在以上的类,结构,接口,代理,<>中, & < T>来了
是什么,有什么用?

如何使用这些< T>有效地

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

推荐答案



如果您询问< T> & <>为此,

我们在这里使用< t>即此处使用的< t>为了实现通用目的,在这里您可以传递任何类型的参数,函数即返回类型,没有限制应使用特定类型的参数,可以传递任何通用类型的参数.

希望这对您有帮助...


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...


朋友,

它的用途更多,但这是您的摘录,

您应该了解,单个&运算符通常用于按位与"运算:
例如;
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;
(6 &amp; 2) = 2
(10 & 5) = 0
(20 & 25) = 16
(123 & 20) = 16



最终结果是:

比较其中每个的二进制表示.



final result is:

Compare the binary representations of each of those.

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


在每种情况下,仅当输入的左右两侧均为1时,结果中的数字才为1.

问候
sarva


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


这些是泛型中使用的模板占位符 [ ^ ].


这篇关于什么是&lt;&gt;和&lt; T&gt;的用途是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆