C#'s equivalent of the stl

  • Thread starter Thread starter Boogie El Aceitoso
  • Start date Start date
B

Boogie El Aceitoso

Hi,

I'm currently learning C# from a C++ background. So far the language looks
interesting but I can't find the equivalent of the C++ STL. Where are the
equivalents of templates, standard container classes, algorithms, etc...? O:-)

Is there any good C++ -> C# migration tutorial?

Thanks O:-)
 
C# will have templates in its next version (c# 2.0, whidbey).
currently you have to use the stuff provided in namespace
System.Collections.
It is not much, a lot of stuff is still missing but is has to be enough for
now.
 
Boogie El Aceitoso said:
I'm currently learning C# from a C++ background. So far the language looks
interesting but I can't find the equivalent of the C++ STL. Where are the
equivalents of templates, standard container classes, algorithms, etc...? O:-)

Is there any good C++ -> C# migration tutorial?

Templates don't exist in C# - generics will fill most of the void when
they arrive with .NET 2.0.

As for other things, the System.Collections has things like lists, maps
etc. What else are you looking for in particular?
 
Boogie said:
I'm currently learning C# from a C++ background. So far the language looks
interesting but I can't find the equivalent of the C++ STL. Where are the
equivalents of templates, standard container classes, algorithms, etc...? O:-)

With C# (as with other .NET languages) you have the .NET SDK as your
library:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/cpref_start.asp
Currently there is no template/generics support but it is announced for
the next version:
http://longhorn.msdn.microsoft.com/lhsdk/ref/system.collections.generic.aspx
 
Back
Top