可能重複:
What does 「T」 mean in C#?
What does <T> denote in C#與<TypeParameter> C#類語法
我已經搜索有關的問題,而是因爲我沒有關於語法的想法,我找不到足夠好的。好了,簡短的解釋後,我的問題是:
雖然我一直在尋找一個粒子特效庫我滿足這個:
[Serializable]
public class DPSF<Particle, Vertex> : IDPSFParticleSystem
where Particle : global::DPSF.DPSFParticle, new()
where Vertex : struct, global::DPSF.IDPSFParticleVertex
{
// constructors, methods, parameters here ...
}
是什麼符號在毯子的意思(< ...>),以及如何它用於?
http://msdn.microsoft.com/en-us/library/ms379564%28VS .80%29.aspx – 2012-04-20 14:24:12
可能重複[什麼是「T」在C#中是什麼意思?](http://stackoverflow.com/questions/400314/what-does-t-mean-in-c)和[什麼在C#中表示](http://stackoverflow.com/questions/9857180/what-does-t-denote-in-c-sharp) –
2012-04-20 14:25:49
謝謝!我正在閱讀帖子,我很好奇爲什麼會有「粒子:......」這是一個限制嗎?我知道T意味着什麼,但我從來沒有見過它與課堂使用!我知道在函數中使用T,但是我仍然想要通過類 – icaptan 2012-04-20 14:26:41