trim(string) vs string.trim

  • Thread starter Thread starter Terry Olsen
  • Start date Start date
Jared,

Who made the standards for the industry those six millions VB users ore the
fraction of that using C++ and Java. Strange enough needs those
programlanguages more books.The writters build have build around that their
theories, what for me only says something about the limited knowledge of
those writters. As your text was right, than there should be much more
semantic from VB in those languages.

An other main language is Cobol, a while ago it was still the most used
proffesional programming language I don't know if that is still the same.

http://www.levenez.com/lang/history.html#01

Beside that it seems that *we* are unable to make it clear to you. The
Microsoft.VisualBasic namespace is in Net the same as the System.Net.Data
namespace. It has only a name that not starts with System.Net. Maybe becomes
it clearer to do (although I doubt that), that everything using those is
simple in the resulting ils exe (assembly).

Just my thought reading your message

Cor
 
Branco said:
The advantage of using Trim instead of String.Trim is exactly that Trim
will recognize when a String is Nothing and return "" as a result. If
this is the logic of your application, then instead of doing:

If SomeStr Is Nothing then
Value = ""
'I personally preffer Value = String.Empty
Else
Value = String.Trim
End If

In C# 2.0, you I would write this:

public static class StringUtils
{
public static string Trim(string str)
{
return (str == null) ? string.Empty : str.Trim();
}
}

A nice one liner :)
 
Cor,
I'm not, nor was I ever disputing the fact that the Microsoft.VisualBasic
namespace is a part of the .net framework. I'll stand down on this
discussion now, it seems that we can agree to disagree on this subject.

Jared
 
Back
Top