Business verification design in System Design 2

Source: Internet
Author: User

mcallbyname: This function is used to obtain attributes at runtime and set attributes or call methods.
example:
imports Microsoft. visualBasic. calltype' the Runtime Library where the method is located
sub testcallbyname1 ()
'set the object property value
callbyname ( textbox1, "text", calltype. set, "new text" )
'get the object property value
msgbox ( callbyname ( textbox1, "text", calltype. get ) )
'call object method
callbyname ( textbox1, "hide", calltype. method )
end sub

Directcast: type conversion is introduced by the keyword. The usage is the same as that of ctype.
Example:
Dim Q as object = 2.37
Dim I as integer = ctype (Q, integer) 'is successful. Cause: As long as a valid Conversion Between Expressions and types is defined, ctype is successful.
Dim J as integer =Directcast (Q, integer)'Failure, cause:DirectcastThe runtime type of the object variable must be the same as the specified type. If the parameter type does not match,DirectcastWill causeInvalidcastexceptionError
If the type matches, directcast performs better than ctype at runtime.

Hashtable: a set of key/value pairs.CodeThis class consumes a lot of memory.
Hybriddictionary: When the collection is small, it is implemented using listdictionary.IdictionaryAnd then switch to hashtable when the set becomes larger.

Serializableattribute: serializes the marked object. After serialization, the object state is stored in the storage media so that identical copies can be re-created later. By value, the object is taken from an application.ProgramThe domain is sent to another application domain.

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.