Home About Rice Downloads Documents Others Cooker CookerGX
Documents  >  Class  >  dictionary  >  Direct call as getter
dictionary class : Direct call as getter

Description

Gets the value using the getter call notation for Rice.

Syntax

dictionaryInstance.Any key

Arguments

None

Return value

ClassDescription
some classA value corresponding to the key.

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 getter call of Rice to get the value corresponding to the key. It is a shorthand notation for the Get(string) method.

Links for reference

None

Copyright © Rice All rights reserved.