Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Translate VB to C#
Message
De
11/12/2013 09:49:08
 
 
À
11/12/2013 09:31:59
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 4.0
OS:
Windows 8
Network:
Windows 2000 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01589830
Message ID:
01589843
Vues:
46
>I have been given some code for VB.NET and am trying to re-write it in C# (really just as an exercise in understanding what it is trying to do) but am stuck on this line:
>
>
Dim commands As String() = alterScopeSql.Split(New String() {"GO" & vbCr & vbLf, "GO ", "GO" & vbTab, "GO"}, StringSplitOptions.RemoveEmptyEntries)
The converter at http://www.developerfusion.com/tools/convert/vb-to-csharp gives:
string[] commands = alterScopeSql.Split(new string[] {
	"GO" + Constants.vbCr + Constants.vbLf,
	"GO ",
	"GO" + Constants.vbTab,
	"GO"
}, StringSplitOptions.RemoveEmptyEntries);
They are not 100% accurate sometimes but usually they do a pretty good job.

Is that one working for you?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform