get List C# replacement

Copper Contributor

Recently, I start wondering about replacing List with duck typed methods that will automatically resize your array to required size and make other changes.
The reason for this is to avoid List's "this[]" parameter:

 

public T this[int index] { get; set; }

 

And get direct access to array for the purpose of better performance during iterations.


Maybe anyone know any of possible problems with it? Because my junior mind don't see any obvious problems with it.

1 Reply

Hi @DarkJune,

Thanks for posting your issue here.

However this platform is used for how-to discussions and sharing best practices for building any app with .NET.Since your issue is a technical question, welcome to post it in Microsoft Q&A forum, the support team and communities on Microsoft Q&A will help you for any technical questions.
Besides, it will be appreciated if you can share it here once you post this technical question Microsoft Q&A.
Best Regards,
Lan Huang