Hello
I want to array with key and valu in vb.net
as like in php

$array['name']="xyz";
$array['surname']="abc";

so is this possible ?
please any suggestion.

Thanks in advance

Hello
I want to array with key and valu in vb.net
as like in php

$array['name']="xyz";
$array['surname']="abc";

so is this possible ?
please any suggestion.

Thanks in advance

>I want to array with key and valu in vb.net
as like in php. so is this possible ?

No

You may use Hashtable class from System.Collections namespace for that purpose. Hashtable instance represents data in key-value pair form.

Here is a sample:

.....
        Dim rec As New System.Collections.Hashtable
        rec.Add("roll", 10)
        rec("name") = "Ronny"
        rec("bdate") = Date.Parse("12-31-1990")

        For Each n In rec.Values
            Console.WriteLine(n)
        Next
        .....

Thank you
i dont know this m php programer only so........

This question has already been answered. Start a new discussion instead.