How to implement class _ Application techniques like HashMap function in ASP

Source: Internet
Author: User
Tags delete key getv

HashMap access to data in Java is convenient, but there are no similar classes in the ASP. The author needs similar data type in the development program, then constructs a class that can basically resemble the HashMap function, can realize the key value access operation and so on, the data that accesses can be any basic type in the ASP.
The following is the code for the program, which is posted to an empty ASP to run directly.

<% Set jb51 = new Jb ' assigns values to MP objects Jb51.putv "a", "Jb51.net" JB51.PUTV "B", "Www.jb51.net" JB51.PUTV "C", "http://www.jb5 1.net "Response.Write" [Number of key values]: "&jb51.count Response.Write" <br> "Response.Write" [A]: "&jb51.getv (" a ") r Esponse.write "<br>" Response.Write ":" &jb51.getv ("B") Response.Write "<br>" Response.Write "[C]:" & Amp;jb51.getv ("C") Response.Write " 

The above is the sharing of ASP how to achieve a similar HashMap function class, I hope that the learning of everyone inspired.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.