I am wondering which is more efficient, using CStr() or object.toString(). The reason I ask this is because I though all that CStr() done was to invoke the .ToString() metho
Late answer, but no one else bothered to check or cite the Visual Basic documentation, and it recommends the opposite of what most of these answers do. This is straight from the Microsoft documentation:
As a rule, you should use the Visual Basic type conversion functions in preference to the .NET Framework methods such as ToString(), either on the Convert class or on an individual type structure or class. The Visual Basic functions are designed for optimal interaction with Visual Basic code, and they also make your source code shorter and easier to read.
That said, sometimes there are differences between what CStr and ToString will return, so performance and readability aren't the only considerations. There is an excellent answer on another question that describes when and why this is the case. Reproduced here:
The ToString method is a standard public method that returns a String. It is a method that is defined by the base Object type as overrideable. Each class can, therefore, override that method to return anything that it wants. It is quite common for classes to override the ToString method to make it return a nice human-readable description of the object.
CStr, on the other hand, is a casting operator. It is shorthand for CType(x, String). The casting operator, like many other operators, can be overridden by any class. Normally, though, you want casting operations to return the closest representation of the actual value of the original object, rather than a descriptive string.
It is not unusual then, that you may want ToString to return a different result than CStr. In the case of an enum, each member is essentially an Integer, so CStr on an enum member works the same as CStr on an integer. That is what you would expect. However, ToString has been overridden to return the more human readable version of the value. That is also what you would expect.
When you want the closest string representation of the actual value of the original object, you should use CStr(). When you want the (potentially) customized, human-readable version of the value, you should use .ToString.