vb.net -> C#: Replace Visual Basic library calls with equivalent things from the .NET framework
See original GitHub issueinstead of using:
!Information.IsDBNull
it should use
!DBNull.Value.Equals
EDIT: See https://github.com/icsharpcode/CodeConverter/issues/174#issuecomment-461091117 for fuller listing
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:11 (10 by maintainers)
Top Results From Across the Web
VB to C# Functions
VisualBasic assembly, so you can use them directly. However, most of them have C# equivalents, or non language specific equivalents in core .NET...
Read more >Tutorial: Create a .NET class library using Visual Studio
In this tutorial, you create a simple class library that contains a single string-handling method. A class library defines types and methods ...
Read more >Breaking changes - .NET Framework to .NET Core
The most important breaking changes are added here as we become aware of them. Core .NET libraries. Change in default value of UseShellExecute ......
Read more >String.Replace Method (System)
Returns a new string in which all occurrences of a specified Unicode character or String in the current string are replaced with another...
Read more >Support Class (Microsoft.VisualBasic.Compatibility.VB6)
Some functions replace Visual Basic 6.0 functions that are no longer supported in Visual Basic; others compensate for differences in the object models....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@GrahamTheCoder “Another good example in #345”
Be carefull with this call.
See the following VB code
The first line sets x to Nothing (null) The second line checks is x is nothing, then executes function q, and then returns “123”. If the first condition was also a function this would have been executed first.
If I replace the IIf with an If (so 1 I) then code runs as: The first line sets x to Nothing (null) The second line checks if x is nothing, so it returns “123” - q is NOT executed.
So iif(x Is Nothing, 1, x.length) will cause a runtime error While if(x Is Nothing, 1, x.length) will not
Request to substitute Vb, Cr and VbCrlf with their string equivalent: https://github.com/icsharpcode/CodeConverter/issues/228