dictionary class : dictionary{int}(string) fitter
Description
Gets an instance initialized by the initialization string.
Syntax
new dictionary{int}(string initStr)
Arguments
Class | Name | Description |
string | initStr | Initialization string. |
Return value
Class | Description |
dictionary{int} | Initialized dictionary. |
Sample code
1: | /**Sample**concat**----------------------- |
2: | {"First":0, "Second":124, "Third":125, "Fourth":126, "Fifth":127,} |
3: | -----------------------------------------------*/ |
4: | rice rr; |
5: | dictionary{int} newIntDictionary = new dictionary{int}(rr.Sample); |
Notes
The format of the initialization string is:
A string that starts with "{" and ends with "}".
Separate the items with commas.
An Item is key and value pair separated by colon.
The key specifies the identifier as a string literal.
Allows a comma to follow the last item.
Allows white space before and after the initialization string and item.
The int can be set as values. Specify in the format of literal.
Links for reference
None.