Share via


IsNumeric, Microsoft.VisualBasic.dll, etc.

Sean and Scott's
earlier posting on IsNumeric has resulted in a few comments...
and I just need to chime in here, use Microsoft.VisualBasic! It is all IL in the
end, right? This topic comes up over and over again on GotDotNet, and I just
want it to go away! Almost always, someone writes up and posts a C#
implementation of IsNumeric that might be useful, but it is not equivalent to
the function from this assembly. Why write your own, incorrect or incomplete,
implementation when a highly-tested one is shipping with the Framework? Are you
going to do the same for all of the functions in the Framework?

Microsoft.VisualBasic.dll is an assembly, it ships
with .NET, it provides useful functions... the decision to use it or not
shouldn't be any more difficult than deciding if you are going to use any other
useful assembly. If you dig into the IL and you don't like what it does, fine...
but I hope you are applying the same standard to all of the libraries you
use.

Comments

  • Anonymous
    March 12, 2003
    So what would stop someone from using anakrino on Microsft.VisualBasic.dll to retrieve this function in C#? Would it not then be the highly-tested one?

    If I remember correctly all one would have to do is rename the local variables to something readable.
  • Anonymous
    March 12, 2003
    Sure, you could... you could do that to any dll in the Framework... Of course, if they improve it in a SP or a new version, you'll have to do it again, but the real question is;

    Why Bother?

    Are you going to do that for every DLL where you want to use one function without referencing the entire assembly?
  • Anonymous
    March 12, 2003
    The comment has been removed
  • Anonymous
    December 26, 2003
    hai how to intepepreter visual basic to assembly
  • Anonymous
    December 26, 2003
    please help about them