I want to ask about the IEnumerable
interface, which as I understand it is used when working with collections (I just started to study them), but the topic is not about collections, but about the contents of the above interface:
namespace System.Collections { // Сводка: // Предоставляет перечислитель, который поддерживает простой перебор элементов // неуниверсальной коллекции. [ComVisible(true)] [Guid("496B0ABE-CDEE-11d3-88E8-00902754C43A")] public interface IEnumerable { // Сводка: // Возвращает перечислитель, осуществляющий итерацию в коллекции. // // Возвращает: // Объект System.Collections.IEnumerator, который может использоваться для перебора // коллекции. [DispId(-4)] IEnumerator GetEnumerator(); } }
So, in order, what I do not understand: string
[ComVisible(true)]
as the definition of Visual Studio gives when I move the cursor to a setting: ** class System.Runtime.InteropServices.ComVisibleAttribute
InteropServices - ? COM - это что вообще ? ComVisibleAttribute - ? что за ComVisible [ComVisible(true)]- какую роль он выполняет
Managed type \ member?
Further:
[DispId(-4)]
Again, the Visual Studio definition ** class System.Runtime.InteropServices.DispldAttribute Specifies the COM dispatch identifier (DISPID) for a method, field, or property. **
COM dispatch identifier (DISPID) - what!?
COM dispatching -?
DISPID -?
And then I go into this
[DispId(-4)]
And there it is:
public sealed class DispIdAttribute : Attribute { // Сводка: // Инициализирует новый экземпляр класса DispIdAttribute, используя указанный // идентификатор DISPID. // // Параметры: // dispId: // Идентификатор DISPID для этого члена. public DispIdAttribute(int dispId); // Сводка: // Возвращает идентификатор DISPID для члена. // // Возвращает: // Идентификатор DISPID для этого члена. public int Value { get; } }
and as I understood this
[DispId(-4)]
is the constructor of the class DispIdAttribute?
I beg you to give a detailed and detailed answer, without this: “there are some mechanisms there, but since you just started learning collections, you don’t need to and even interfere” - believe me, I need everything. You can answer the questions, even need them so that these disparate questions will eventually form one comprehensive answer.