المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : about ArraySegment



C# Programming
06-11-2009, 09:12 PM
I just know there is one generics: ArraySegment, is used to take one part of an array.

but I really do not understand why this special generics is given (in contranst to other more general generics such as List, Dictionary and so on). because it seems to me it can only realize single function: take one part of an array.

therefore, is it necessary to define one generics ArraySegment? instead, one method can be added into Array or List is just fine.

Perhaps my understanding is not correct.

thanks