dictionary class : Direct call as setter

Description

Sets the value using the setter call notation for Rice.

Syntax

dictionaryInstance.Any key = someInstance

Arguments

ClassNameDescription
some classsomeInstanceSome instance.

Return value

None

Sample code

dictionary{int} orgDic = new dictionary{int}();

orgDic.item1 = 10;

orgDic.item2 = 8;

orgDic.item3 = 9;

int i1 = orgDic.item1; // 10

int i2 = orgDic.item2; // 8

int i3 = orgDic.item3; // 9

Notes

This notation is added in Ver 1.1.0.0.

It use the setter call of Rice to set the value corresponding to the key. It is a shorthand notation for the Set(string,class) method.

Links for reference

None

Copyright © Rice All rights reserved.