Total .NET Analyzer Rule Documentation  

LateBound Rule

Avoid late binding variables.

Remarks

When Option Strict is turned off, Visual Basic .NET allows objects to be 'late bound'. This means that the variable is declared to be of type Object, and can hold references to any object. Although this may seem convenient, late binding is not optimally efficient and can lead to difficult to diagnose bugs.

Resolution

Whenever possible, you should use early-binding in your applications. Early binding makes your applications faster and makes your code easier to read (since it states the object type that is used), and it reduces the number of run-time errors by allowing the compiler to report errors during compilation. Early binding also makes code writing easier, as it enables such Visual Studio .NET features as automatic code completion and Dynamic Help.

Ideally, every file in your application should have Option Strict on to disallow late binding.

See Also

Early and Late Binding

Total .NET Analyzer Option Strict Rule