Forum Discussion
FICO
16 years agoCommunity Manager
How to use "Hashtable" class in the Blaze Advisor .net
How to use "Hashtable" class in the Blaze Advisor .net
Hi, I'm working on C# & Blaze Advisor .NET But i have a little problem. P_Hash-> .net Hashtable object. but it can't reference the Hashtable object. How to use the Hashtable object. For example, P_Hash[P_KEY] <- error... if ( P_Hash.ContainsKey(P_KEY) ) then { return P_Hash.[P_KEY] as a string. <-- error } else { return "". } Please help me. Have a good day.1 Reply
- FICOCommunity Manager
Hi,
Are you trying to create a Hashtable (System.Collections.Hashtable) instance in your rules project? If you are, did you import the class into your project through your .Net BOM?
You can also use the built-in "association" if you do not have to have the .Net versjon. You declare it like this:
myHash is some association from <keytype> to <valuetype>;
Initialization:
myHash = an association from <keytype> to <valuetype>;
Indexing:
myValue is some <valuetype> initially myHash[<key>];
Inserting:
myHash[<key>] = myValue;
Regards,
Jostein
Related Content
Related Content
Mapping methods between XPRBctr and new class Inequality
I'm porting a Java application to c++ (I'm using latest Xpress Version). From guide I understood that XPRBctr old BCL class has been mapped to Inequality, but I cannot find some methods (i.e. addTerm...1 year agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum1 unread comment1 unread0Views0likes1Comment