Added interface indicating that a specific indexer is supported.

pull/372/head
David Hall 2023-01-16 12:06:28 -07:00
parent 643a8c1556
commit bebc771ac6
1 changed files with 12 additions and 0 deletions

12
Core/ISupportIndexer.cs Normal file
View File

@ -0,0 +1,12 @@
namespace Vanara;
/// <summary>Interface representing a class that holds an indexer.</summary>
/// <typeparam name="TVal">The type of the indexer's value.</typeparam>
/// <typeparam name="TRet">The type of the indexer's return value.</typeparam>
public interface ISupportIndexer<TVal, TRet>
{
/// <summary>Gets or sets the <typeparamref name="TRet"/> with the specified <typeparamref name="TVal"/>.</summary>
/// <value>The <typeparamref name="TRet"/>.</value>
/// <returns>The <typeparamref name="TVal"/>.</returns>
TRet this[TVal index] { get; set; }
}