![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Hi, Throw an exception. Throw new Exception("I have an error") http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vastmThrow.asp Ken ------------------------------------ "Robert" <no (AT) spam (DOT) com> wrote in message news:eEZ$1rU9EHA.2788 (AT) TK2MSFTNGP15 (DOT) phx.gbl... I need to remove the import of Microsoft.Visualbasic. Some older .Net code is littered with these. What is the best practice in this case? Thanks in advance. |
#4
| |||
| |||
|
|
I am familiar with exceptions, however throwing an error of 0 is basically saying there is no error. In the code it appears it is being used to do a far return to the routine closest on the call stack, with an error handler. |
|
Also, is there a FAQ on how to work around all the functions in Microsoft.VisualBasic? |
#5
| |||
| |||
|
|
"Robert" <no (AT) spam (DOT) com> schrieb: I am familiar with exceptions, however throwing an error of 0 is basically saying there is no error. In the code it appears it is being used to do a far return to the routine closest on the call stack, with an error handler. Exceptions should not be used to control program flow. |
|
Also, is there a FAQ on how to work around all the functions in Microsoft.VisualBasic? There is no need to work around the functions included in "Microsoft.VisualBasic.dll" because they are part of VB. |
#6
| ||||||
| ||||||
|
|
Also, is there a FAQ on how to work around all the functions in Microsoft.VisualBasic? There is no need to work around the functions included in "Microsoft.VisualBasic.dll" because they are part of VB. If it is part of VB, why must one Import the namespace (either in each of your code files) or at the project properties/imports level? |
|
Seems to be an add-on library, and not part of the the VB to IL compiler process.. |
|
Since I can NOT use these functions for a PocketPC port I would love to find a resource with the common work arounds. |
|
Do you advocate using ANY of the functionality in the Microsoft.VisualBasic namespace?!? Ever? |
|
I do not use this namespace. I have read numerous articles about the performance hits, and after all it is just a wrapper around the System namespaces. |
|
Hope I do not come across as an ass, but it seems you completely missed my points. |
#7
| |||
| |||
|
|
Do you advocate using ANY of the functionality in the Microsoft.VisualBasic namespace?!? Ever? I totally advocate using the functions in the Microsoft.VisualBasic |
|
inline.. "Herfried K. Wagner [MVP]" <hirf-spam-me-here (AT) gmx (DOT) at> wrote in message news:OknwmbX9EHA.2192 (AT) TK2MSFTNGP14 (DOT) phx.gbl... "Robert" <no (AT) spam (DOT) com> schrieb: I am familiar with exceptions, however throwing an error of 0 is basically saying there is no error. In the code it appears it is being used to do a far return to the routine closest on the call stack, with an error handler. Exceptions should not be used to control program flow. Agreed. Not my code.. Did not want to break interfaces. Also, is there a FAQ on how to work around all the functions in Microsoft.VisualBasic? There is no need to work around the functions included in "Microsoft.VisualBasic.dll" because they are part of VB. If it is part of VB, why must one Import the namespace (either in each of your code files) or at the project properties/imports level? Seems to be an add-on library, and not part of the the VB to IL compiler process.. Since I can NOT use these functions for a PocketPC port I would love to find a resource with the common work arounds. Do you advocate using ANY of the functionality in the Microsoft.VisualBasic namespace?!? Ever? I do not use this namespace. I have read numerous articles about the performance hits, and after all it is just a wrapper around the System namespaces. Hope I do not come across as an ass, but it seems you completely missed my points. Anyway, if you know of a FAQ the touches on removing this depencency, please post it. It would prevent me from reinventing the wheel. Thanks again. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |