SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Browse by Tags

All Tags » Code conversion (RSS)
  • Code conversion bug for ElseIf and the way to fix it

    else if statement is converted without proper indentation. To fix the tiny bug, you need to a line to CSharpOutputVisitor.VisitElseIfSection and VBNetOutputVisitor.VisitElseIfSection as follows: public object VisitElseIfSection(ElseIfSection elseIfSection, object data) { outputFormatter.Indent(); Charles...
    Posted to Forum by charles zhang on 08-13-2007
    Filed under: Code conversion, #develop 2.2
  • Code Conversion bug and the way to fix it

    The following code in VB If a>1 then a=a+1 End If is converted to C# as if ( a>1) { a=a+1 } The bracket is always in the next line regardless of the PrettyPrintOptions To fix the bug, you need to simply change nodeTracker.TrackedVisit(stmt, null ); to nodeTracker.TrackedVisit(stmt, prettyPrintOptions...
    Posted to Forum by charles zhang on 08-13-2007
    Filed under: Code conversion, #develop 2.1
  • C# chained comparison operators in for loop

    Relevant section of C# code (complete code section was converted): // extract the part within quotes char ch; int nEnd; for (nEnd = 1; (ch = sBodyStruct[nEnd]) != '"'; nEnd++) { if (ch == '\\') nEnd++; } Converted VB.NET code: ' extract the part within quotes Dim ch As Char Dim nEnd As Integer nEnd ...
    Posted to Forum by Satch on 01-19-2007
    Filed under: Bug report, #report, Code conversion, bug
  • -- line 1 col 1: EOF expected

    I just tried to translate a single statement from VB.NET to C# using the online code convertor but the above mentioned error was returned. What could possibly be the reason ?? I dont know if this is a known bug as I could not find anything related to this on the forum as well .
    Posted to Forum by ashutosh9910 on 11-06-2006
    Filed under: Code conversion
  • Optimization: Convert C# to VB.NET

    The following C# code String Test = "My Test\n" ; converts to VB.NET Dim Test As String = "My Test" & Chr(10) & "" and back to C# string Test = "My Test" + Strings.Chr(10) + ""; I think the code could be optimized by replacing escape sequences...
    Posted to Forum by Ewald on 11-13-2007
    Filed under: Code conversion
  • Re: Optimization: Convert C# to VB.NET

    You're certainly right with the string performance. I 'converted' that knowledge from VB6, got used to replace "" with vbNullString etc. and have not checked again with .NET. I knew of constants for Chr(8) up to Chr(13) and some combinations. Chr(0) is vbNullChar.
    Posted to Forum by Ewald on 11-13-2007
    Filed under: Code conversion
  • C# to VB conversion: missing 'AddressOf'

    Hi, thanks for the converter. It missed an "AddressOf" converting the following code: http://www.eggheadcafe.com/articles/20051223.asp in "RunTask" method: ---------------------------------------------------------------------------------------------- Public Sub RunTask() ' Only...
    Posted to Forum by dieresys on 01-03-2008
    Filed under: Code conversion, bug
  • Bug when trying to Convert file to Python

    SharpDevelop Version : 3.0.0.2917 .NET Version : 2.0.50727.1433 OS Version : Microsoft Windows NT 5.1.2600 Service Pack 2 Current culture : German (Germany) (de-DE) Working Set Memory : 94576kb GC Heap Memory : 22776kb Exception thrown: System.ArgumentNullException: Der Wert darf nicht NULL sein. Parametername...
    Posted to Forum by siegi44 on 01-25-2008
    Filed under: Code conversion, SharpDevelop 3.0, C# -> Python
  • VB CInt() convert to C# is an int cast but should be Convert.ToInt()

    Running 2.2 I see this issue (and assume it remains with latest build as 'Search' does not show any results). CInt() is converted by SharpDevelop 2.2 to a simple int cast, which is plan and simply wrong. By the way, if you Google around, this notion of the equivalent of CInt() being an (int)...
    Posted to Forum by harrystein on 03-04-2008
    Filed under: Bug report, .Net 2.0 bugs, Translation, Code conversion, bug, #develop 2.1, #develop 2.2, convert, #develop, SharpDevelop 3.0
  • Re: VB CInt() convert to C# is an int cast but should be Convert.ToInt()

    Recall the cast (int)( expr ) is the wrong answer for VB CInt( expr ) to C# -- i.e, should be Convert.ToInt32( expr ) . Still, to answer the question, the following types for expr can be specified for the explicit cast to int (more to come :-) ): (int)( long_expr ) (int)( ulong_expr ) (int)( float_expr...
    Posted to Forum by harrystein on 03-05-2008
    Filed under: Translation, Code conversion, Visual Basic, convert
Page 1 of 2 (14 items) 1 2 Next >
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.