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.