Re: What doe sthis line mean?



Daniel wrote:

m_verts = new GraphicsBuffer<PositionColored>( 3 );

Can someone explain what the < > bit id for? i have never seen this sue of
the < symbol and dont know what it does. Thanks.

This is a generic class (like template classes in C++). This is a way to
build a set of classes parameterized by a type.

The most common use of these kinds of classes are containers. Instead of
using the same container class for storing Apples and Potatoes, you can
define a generic container that can manipulate Apples or Potatoes,
according to a type parameter : Container<Apple> will store Apples and
Container<Potatoes> will store Potatoes.

This allow to detect errors (like inserting a Potatoe into an Apples
container) at compilation time instead of getting an error at runtime.

You can find a more detailed explanation there :
http://www.developer.com/net/net/article.php/2229511

--
Arnaud
.



Relevant Pages

  • Re: Since theres so little content concerning cooking, Ill be back later
    ... I steamed 2 lbs. of crablegs, how's about them apples? ... A friend of mine told me her geese won't eat anything ... Peaches does like carrots and while I don't, I'll add carrots to beef stew ... I love baked potatoes and mashed potatoes but they aren't ...
    (rec.food.cooking)
  • Re: supermarket cashier again
    ... >>> that many potatoes, they're already in a sealed sack). ... > You buy oranges, tomatoes, mushrooms, or radishes by the stone?? ... He explained to me that apples get sprayed at regular intervals ... What's alar? ...
    (sci.lang)
  • Re: How would you make hash browns/home fries
    ... I would like to pre cook then as much as possible because I want to take ... I just bought some small red potatoes. ... potatoes when camping or at home on the grill. ... After your container is filled with the ...
    (rec.food.cooking)
  • Re: Toni/Oma Ries German Recipes - Long
    ... My MIL used to make potato dumplings about the size of tennis balls, ... about half raw grated potatoes, squeezed in a kitchen towel to extract as ... > Rotkohl Mit Aepfeln (Red Cabbage With Apples) ... > water, vinegar, sugar salt, pepper, cloves, bay leaf and lemon juice. ...
    (rec.crafts.textiles.quilting)
  • potato salad done!
    ... I forget that I need a little bit more than one container of miracle whip and have to go out to get more. ... What annoyed me even more this year was that my potatoes went off and I had already went up to the store to get more. ... With a three year old in tow, the corner grocery store is a daunting task, especially without a cart. ...
    (rec.food.cooking)