x


Dictionary within a dictionary?

Hi there (again and again and again.. lol and expect much more greetings soon) :P

Anyways im having problems initialising a dictionary within a dictionary. Ive made sure that my spaces are included :P , but the compilor seems to say otherwise. Something about not being able to convert ..... If im declaring this wrong, then please do tell. My aim is to have a for each key the value will have its own dictionary as well.

Heres what i have so far.

import System.Collections.Generic;

private var componentsExtracted:Dictionary;


function Start() 
{
    componentsExtracted = new Dictionary.<GameObject,Dictionary.<Component,float> >();
}
more ▼

asked Apr 06 '12 at 06:30 PM

naqvir gravatar image

naqvir
89 9 18 19

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first
import System.Collections.Generic;

private var componentsExtracted:Dictionary.<GameObject,Dictionary.<Component,float > >;


function Start() 
{
    componentsExtracted = new Dictionary.<GameObject,Dictionary.<Component,float > >();
}
more ▼

answered Apr 06 '12 at 07:03 PM

naqvir gravatar image

naqvir
89 9 18 19

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2090
x1951
x156
x72
x54

asked: Apr 06 '12 at 06:30 PM

Seen: 582 times

Last Updated: Apr 06 '12 at 07:03 PM