X hits on this document

824 views

0 shares

0 downloads

0 comments

327 / 396

C# LANGUAGE SPECIFICATION

17.5.1 Interoperation with COM and Win32 components

The .NET runtime provides a large number of attributes that enable C# programs to interoperate with components written using COM and Win32 DLLs. For example, the DllImport attribute can be used on a static extern method to indicate that the implementation of the method is to be found in a Win32 DLL. These attributes are found in the System.Runtime.InteropServices namespace, and detailed documentation for these attributes is found in the .NET runtime documentation.

17.5.2 Interoperation with other .NET languages

17.5.2.1 The IndexerName attribute

Indexers are implemented in .NET using indexed properties, and have a name in the .NET metadata. If no IndexerName attribute is present for an indexer, then the name Item is used by default. The IndexerName attribute enables a developer to override this default and specify a different name.

namespace System.Runtime.CompilerServices.CSharp { [AttributeUsage(AttributeTargets.Property)] public class IndexerNameAttribute: Attribute { public IndexerNameAttribute(string indexerName) {...}

public string Value { get {...} } } }

314Copyright Microsoft Corporation 1999-2003. All Rights Reserved.

Document info
Document views824
Page views824
Page last viewedSun Dec 04 11:23:37 UTC 2016
Pages396
Paragraphs9401
Words133190

Comments