Why can I apply an indexer to an ICollection in VB.Net, but not in C#

前端 未结 4 1433
一整个雨季
一整个雨季 2021-01-17 10:23

Was converting some code from VB.Net to C#, when I came across this, in some code using the Ionic Zip library:

Dim zipEntry1 As ZipEntry = zipFile1.Entries(0         


        
4条回答
  •  一整个雨季
    2021-01-17 10:41

    VB has long had the idea of a default member for it's classes, which for collections is always the member Item().

提交回复
热议问题