Skip to Main Content
C# Cookbook, 2nd Edition
book

C# Cookbook, 2nd Edition

by Jay Hilyard, Stephen Teilhet
January 2006
Intermediate to advanced content levelIntermediate to advanced
1184 pages
43h 23m
English
O'Reilly Media, Inc.
Content preview from C# Cookbook, 2nd Edition
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
512
|
Chapter 9: Delegates, Events, and Anonymous Methods
This class passes the name of the logged-on user to the XxxListener methods to allow
them to determine whether the operation should continue based on that user’s privi-
leges. This is just one example of creating a specialized
EventArgs class. You can cre-
ate others to pass in whatever information your listeners need.
See Also
See Recipe 9.5; see the “Event Keyword,” “EventHandler Delegate,” and “Handling
and Raising Events” topics in the MSDN documentation.
9.7 An Advanced Interface Search Mechanism
Problem
You are searching for an interface using the Type class. However, complex interface
searches are not available through the
GetInterface and GetInterfaces methods of a
Type object. The GetInterface method searches for an interface only by name (using
a case-sensitive or case-insensitive search), and the
GetInterfaces method returns an
array of all the interfaces implemented on a particular type. You want a more
focused searching mechanism that might involve searching for interfaces that define
a method with a specific signature or implemented interfaces that are loaded from
the GAC. You need more flexible and more advanced searching for interfaces that
does not involve creating your own interface search engine. This capability
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# Cookbook

C# Cookbook

Joe Mayo
C# Cookbook

C# Cookbook

Stephen Teilhet, Jay Hilyard
Head First C#, 4th Edition

Head First C#, 4th Edition

Andrew Stellman, Jennifer Greene

Publisher Resources

ISBN: 0596100639Supplemental ContentCatalog PageErrata