Chapter 5 Advanced Class Design
Short Description
Chapter 5. Advanced C# Class Construction. Techniques. This chapter rounds out your introduction to the core aspects of the C# language by …
Website: www.c-sharpcorner.com | Filesize: 534kb
Content
A Comprehensive Guide to C# and the .NET Platform, .2001 Andrew Troelsen
(Apress, ISBN: 1-893115-59-3) p. 5-1
Chapter 5
Advanced C# Class Construction
Techniques
This chapter rounds out your introduction to the core aspects of the C# language by
examining a number of advanced (but extremely useful) syntactic constructs. To begin,
you learn how to construct and use an indexer method. This C# mechanism enables you
to build custom types, which exposes internal subtypes using the familiar bracket
operator (i.e., []). If you have a C++ background, you will find that creating a C# indexer
method is analogous to overloading the [] operator on a C++ class. Once you learn how
to build an indexer, you then examine how to overload various operators (+, -, <, > and so
forth) for a custom C# type.
This chapter then examines three techniques that enable the objects in your system to
engage in bidirectional communications. First, you learn about the C# “delegate”
keyword, which is little more than a type-safe function pointer. Once you learn how to
create and manipulate delegates, you are in a perfect position to investigate the…
Get the file Download here
Related Books:Related Searches: c delegate, andrew troelsen, class construction, core aspects, custom c
Comments
Leave a Reply