Skip to Main Content
C# in a Nutshell, Second Edition
book

C# in a Nutshell, Second Edition

by Peter Drayton, Ben Albahari, Ted Neward
August 2003
Intermediate to advanced content levelIntermediate to advanced
928 pages
32h 1m
English
O'Reilly Media, Inc.
Content preview from C# in a Nutshell, Second Edition

Name

IDictionary

Synopsis

This base interface for a collection of key/value elements defines the indexer (in C#, the this property; in VB.NET, the property marked as Default), as well as the Keys and Values properties that return collections containing the dictionary’s keys or values, respectively. This interface also defines the methods by which the entries may be modified, such as Add( ), Clear( ), and Remove( ).

public interface IDictionary : ICollection, IEnumerable {
// Public Instance Properties
   public bool IsFixedSize{get; }
   public bool IsReadOnly{get; }
   public ICollection Keys{get; }
   public object this[object key]{set; get; }
   public ICollection Values{get; }
// Public Instance Methods
   public void Add(object key, object value);
   public void Clear( );
   public bool Contains(object key);
   public IDictionaryEnumerator GetEnumerator( );
   public void Remove(object key);
}

Implemented By

DictionaryBase, Hashtable, SortedList, System.Collections.Specialized.{HybridDictionary, ListDictionary}

Returned By

DictionaryBase.Dictionary, System.Environment.GetEnvironmentVariables( )

Passed To

Hashtable.Hashtable( ), SortedList.SortedList( ), System.Collections.Specialized.CollectionsUtil.CreateCaseInsensitiveHashtable( ), System.Diagnostics.EventLogInstaller.{Install( ), Rollback( ), Uninstall( )}

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

C# in a Nutshell

C# in a Nutshell

Ben Albahari, Ted Neward, Peter Drayton
C# 7.0 in a Nutshell

C# 7.0 in a Nutshell

Joseph Albahari, Ben Albahari
C# Cookbook, 2nd Edition

C# Cookbook, 2nd Edition

Jay Hilyard, Stephen Teilhet
C# Cookbook

C# Cookbook

Stephen Teilhet, Jay Hilyard

Publisher Resources

ISBN: 0596005261Catalog PageErrata