<ne***********@gmail.coma écrit dans le message de news:
11**********************@i3g2000cwc.googlegroups.c om...
| What does the < mean? What do I search on to understand what the
| angle bracket symbols mean in a context like this? Thank you for any
| help.
private Dictionary<int, BitmapInfom_dictBitmapID2BitmapInfo;
This indicates that a generic Dictionary class is being "bound" to int, as
the key, and BitmapInfo, as the value, types.
Previously, to create a dictionary in .NET1.1, you would have had to use a
Hashtable and cast both the key and value to/from their real types to
System.Object. A generic class allows you to declare a class that can work
with many different types; in situations where the code remains the same,
only the type changes.
This is especially efficient because any operation that casts a value type
like an integer to System.Object also involves a boxing operation. Generic
classes like List<Tallow binding directly to the integer type as in
List<intto give you a list of integers that is typesafe and that does not
incur any boxing/casting penalty when adding/retrieving items.
Joanna
--
Joanna Carter [TeamB]
Consultant Software Engineer