Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Do VB6 performance tips also help in VB.NET

Status
Not open for further replies.

robdon

Programmer
May 21, 2001
252
ES
Hi,

I've just been reading some tips on performance for VB6.

I'm planning to change my empty string settings to use vbNullString and to do Len() tests instead of testing for "" since its faster.

I'm also planning, some time in the future, to move to VB.NET and I'm woundering if you get the same performance gain in VB.NET

This is because there is a slight 'code readability' degrade in using these methods, so if they dont help in VB.NET I dont want to convert my project to use the vbNullString and Len().

Thanks,

Rob D
 
The .NET stringclass has a Lenght() property and they start out as being null or nothing or empty (one of those three; think it was empty...) and you can also assign them that status.

Greetings,
Rick
 
The equivalent of vbnullstring in VB.NET is String.Empty

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Hi,

Thanks guys,

But my question was more about if the technique of using vblNullString (or in .NET String.Empty) would give me a performance gain in .NET like it does not VB6...

Since I'm planning to move to .NET at some time, if I dont get the performance gain in .NET then there is not much point me doing this change in VB6.

Ta,

Rob D.
 
All the .net technologies are very different from VB6, so other than basic code optimization techniques (i.e. don't put expensive operations inside loops, etc), it'll be a whole new game to learn.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top