问题描述
Indexer类似于 属性。
但我认为索引器不是特殊形式的属性。
Indexer is similar to property.
but I think indexer isn't special form of property.
索引器是一种特殊形式属性?
Is indexer a special form of property?
推荐答案
从技术上讲,Indexer和Property在代码中具有不同的机制。查看
Technically, Indexer and Property have different mechanics as in code. Review the
以下链接以准确了解上下文使用情况;
following link to learn exactly the context usage;
https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/indexers/
https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/indexers/
https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/properties
https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/properties
希望这会有所帮助:)
Hope this helps :)
这篇关于索引器是一种特殊形式的财产吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!