C#.NET Script – Associative Array

Associative array is very useful due to its flexibility and expandability. It can contain any data types and unlimited sub arrays. So far, .NET framework has not provide similar functionality with PHP associative array. Don’t worry, we can still do it in C#.NET by utilizing dictionary. We have to use dictionary to keep the order of array element entry. If we use hashtable, the element order will be messed up. In this article, we will show you how dictionary can support the flexibility and expandability of PHP associative array.

Source Code

Get the script/source code here
http://forum.xhanch.com/index.php/topic,3075.0.html

Incoming Search Terms

c# associative array, net associative array, associative array c#, associative array in c sharp, c# associative arrays, associative array in c#, c sharp associative array, associative array c sharp, associative array in net, csharp associative array, associative array NET, c# named array, net associative arrays, Associative Arrays in C#, c# associated array, associative array csharp, net named array, c net associative array, c associative array, associative arrays c#, c# Script array, c# net associative array, c# associative arraylist, c# named arrays, c# key value array, associate array in C#, c# associative array hashtable, csharp foreach associative array, c# array associativi, c# assoc array, c# associate array, c# foreach associative array, net associative array guid, associated array in c#, associative arrays in c sharp, net collections generic dictionary<object object>, associative arrays c sharp, associative arraylist, csharp associative arrays, csharp assoc array, named array C#, csharp for each associative array, c# create assozitve array, csharp php arrays named, convert php associative array to net, convert javascript associative array to c# dictionary, creating associative array in c#, C# create associative array, csharp associative list, c# create associate array, vettori associativo c#, foreach associative array in c#, csharp associative arrayx, c# dictionary data plugins, c# net php post creating associative array, cast associative array to hashtable c#, C# keyed array of counts, convert json to c# class dictionaries (associative arrays), C# Keyed Array, C# как уничтожить переменную#, c# get keys of associative array, c# Generic class for associative array, c# foreach assoziatives array, csharp named array, c# dictionary to array, c# create associete array, c# associative array quick, associative arraylist c#, associative array php c#, associative array of T c#, associative array net 4, associateve array csharp, Associative array list c#, associative array in c, Associative Array class in C#, associative array c shapr, associated arrays in c#, associated array c#, associate array net, associate array c#, assoc array net, assoc array in c#, associative arrays c# foreach, associative in C#, associative lists c#, c# associative array NET 3 5, c# associative array foreach, C# associative arraty, c# array associativo, c# array associative, c# array associatif, c ассоциативные массивы, c sharp keyed array, c sharp foreach associative array, c sharp asscoaitivate array, c net associative arrays, c net associative array key, assoziative arrays c#, assosiated array in C#, associativeArray C#, Xhanch, Xhanch Studio


Posted on 2010-02-15 by Susanto BSc in C#.NET Script, Free Script
Free, .net, Flexible, Expandable, Hashtable, Associative Array, Element, Associative, Script, Array, C#.NET, Dictionary, Code, C#, Xhanch, Xhanch Studio

Tagged as: , , , , , , , , , , , , ,

2 Responses to “C#.NET Script – Associative Array”

  1. aleroot says:

    This method in the class :
    public static bool IsAssociativeArray(){
    return (this.Item.GetType().ToString().StartsWith(“System.Collections.Generic.Dictionary”));
    }

    Give me an error “Impossible use Keyword this in static method” !

    When i try to do this in my program :

    mp.Item = arr.Item[key];

    Give me an error :
    Cast Missing , Impossible convert object in ‘System.Collections.Generic.Dictionary’.

    Why ?
    Have you try to use this class ??

    • Susanto BSc says:

      This class has been tested for sure since I have used it on some of my projects.
      The error you get does not make sense.
      FYI, this class is built under .NET FX 3.5.
      Perhaps it is caused by incompatible version.

Leave a Reply

You must be logged in to post a comment.