advantages and disadvantages of the import of : microsoft.visualb

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I had a discusion with a collegue of mine because i use the
microsoft.visualbasic.right method . He said i should not do that ...

Is he right or not ?
 
I had a discusion with a collegue of mine because i use the
microsoft.visualbasic.right method . He said i should not do that ...

Is he right or not ?

I would personally avoid it, particularly if you're using C#. You can
very easily use String.Substring instead, and if you're using C# people
reading your code are much more likely to be familiar with that than
with Right.
 
If you take a look at the IL code for the Right function in the Microsoft.VisualBasic assembly, you will see that it actually calls String.SubString. So if you call Right you will get an extra overhead (although probably quite small) compared to just calling String.SubString.

Regards, Jakob.
 
Back
Top