Comparison of programming languages (associative array): Difference between revisions

Content deleted Content added
m F#: {{code}}
Line 408:
 
====Dictionary<'TKey,'TValue>====
Because F# is a .NET language, it also has access to features of the [[.NET Framework]], including the <{{code>|System.Collections.Generic.Dictionary<'TKey,'TValue></code>|f#}} type (which is implemented as a [[hash table]]), which is the primary associative array type used in C# and Visual Basic. This type may be preferred when writing code that is intended to operate with other languages on the .NET Framework, or when the performance characteristics of a hash table are preferred over those of an AVL tree.
 
=====Creation=====
Line 422:
</syntaxhighlight>
 
When a mutable dictionary is needed, the constructor of <{{code>|System.Collections.Generic.Dictionary<'TKey,'TValue></code>|f#}} can be called directly. See [[#C#|the C# example on this page]] for additional information.
 
<syntaxhighlight lang=fsharp>