查找msdn
应该是自己写的一个函数吧~~~

解决方案 »

  1.   

    怎么会呢!vb自带的引用了Microsoft.VisualBasic.CompilerServices
    就是不知道怎么解释 参考以下网址
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vbtchmicrosoftvisualbasicnetinternals.aspLate Binding
    Late binding is the process of matching an Object variable to the implementation of the type of object it references at run time. All languages that support the .NET Framework can support late binding by using System.Object variables and methods from the System.Reflection namespace for invoking object members. Visual Basic .NET provides implicit support for late binding by allowing you to write code as if objects were early bound. The compiler generates IL to use Visual Basic Runtime features that do the reflection work for you. Consider the following call to the Show method of an instance of Form1, which derives from System.Windows.Forms.Form:Dim o As Object
    o = New Form1()
    o.Show()
    The IL generated by the compiler is a single (though expensive) method call:call   void [Microsoft.VisualBasic]Microsoft.VisualBasic.CompilerServices.LateBinding::LateCall(object,
                                            class [mscorlib]System.Type,
                                            string,
                                            object[],
                                            string[],
                                            bool[])
    Late binding consumes significantly more resources than early binding (locating implementation at compile time) since the common language runtime is forced to perform type checking and member lookup at run time. However, late binding provides benefits that make it extremely useful in many situations. Consider an application that automates the printing of files and keeps a log of each file printed. The files may be Word documents, Excel spreadsheets, or some other type of file. Rather than recoding the same logic for each type of file, or requiring objects to implement the same interface (which you may not be able to do if you are not the author of the objects) you could use one method (for example, PrintOutAndLog) that takes an Object as a parameter and calls the object's PrintOut method. The application can be extended to use object models for any file type—as long as there is a PrintOut method, PrintOutAndLog can print the file. The PrintOutAndLog method can be placed in a class (or module) in its own source file with Option Strict Off to allow late binding. The rest of your application can then use Option Strict On to prevent late binding in other files. Refer to the section Use Option Strict On for more details on Option Strict.Recommendation: Late binding should not be used in most applications, but you should use Visual Basic's implicit late binding for scenarios where you would otherwise have to write reflection code.