user1672097
user1672097

Reputation: 351

Identifying Late binding in VB.NET

I have an application which had been migrated to VB to VB.NET. Now in few places in VB there were code written for using Trim operation on a non-string Datatype. The code runs well in VB but the same produce error on migrated code in VB.NET.Following is the code snippet

dr["N0"].Trim() ----where "NO" is an integer or any non-string DataType

I want to identify these places in my migrated VB.NET code base. How I can do that without minimal effort? Any efficient idea or technique?

Upvotes: 2

Views: 108

Answers (1)

Zach Leighton
Zach Leighton

Reputation: 1941

Just gate these with TypeOf http://msdn.microsoft.com/en-us/library/0ec5kw18.aspx, you could even use a Debug.Alert(); so as you're going through the program you get alerted (in debug mode).

Upvotes: 1

Related Questions