Help for translating from C#

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Carlo, MCP

    #1

    Help for translating from C#

    Hello,
    please, help me to translate these four lines of C# code in VB:


    bool topLeft, topRight, bottomLeft, bottomRight;
    int topLeftRadius, topRightRadius, bottomLeftRadiu s, bottomRightRadi us;
    topLeft = topRight = bottomLeft = bottomRight = true;
    topLeftRadius = topRightRadius = bottomLeftRadiu s = bottomRightRadi us =
    workRadius;


    Thank you a lot!

    C.



  • Tor Inge Schulstad

    #2
    Re: Help for translating from C#

    Carlo, MCP wrote:[color=blue]
    > Hello,
    > please, help me to translate these four lines of C# code in VB:
    >
    >
    > bool topLeft, topRight, bottomLeft, bottomRight;
    > int topLeftRadius, topRightRadius, bottomLeftRadiu s, bottomRightRadi us;
    > topLeft = topRight = bottomLeft = bottomRight = true;
    > topLeftRadius = topRightRadius = bottomLeftRadiu s = bottomRightRadi us =
    > workRadius;
    >
    >
    > Thank you a lot!
    >
    > C.
    >
    >
    >[/color]
    Dim topLeft, topRight, bottomLeft, bottomRight as boolean
    dim topLeftRadius, topRightRadius, bottomLeftRadiu s, bottomRightRadi us
    as integer
    topLeft = topRight = bottomLeft = bottomRight = true
    topLeftRadius = topRightRadius = bottomLeftRadiu s = bottomRightRadi us =
    workRadius

    (... i think..)

    __
    Tor Inge

    Comment

    • Carlo, MCP

      #3
      Re: Help for translating from C#

      Thank you, but 3rd and 4th lines seens to be the same as C#...



      "Tor Inge Schulstad" <tor.inge.schul stad@gmail.com> ha scritto nel messaggio
      news:U5-dnSLpl_TjPLve4p 2dnA@telenor.co m...[color=blue]
      > Carlo, MCP wrote:[color=green]
      >> Hello,
      >> please, help me to translate these four lines of C# code in VB:
      >>
      >>
      >> bool topLeft, topRight, bottomLeft, bottomRight;
      >> int topLeftRadius, topRightRadius, bottomLeftRadiu s, bottomRightRadi us;
      >> topLeft = topRight = bottomLeft = bottomRight = true;
      >> topLeftRadius = topRightRadius = bottomLeftRadiu s = bottomRightRadi us =
      >> workRadius;
      >>
      >>
      >> Thank you a lot!
      >>
      >> C.
      >>
      >>
      >>[/color]
      > Dim topLeft, topRight, bottomLeft, bottomRight as boolean
      > dim topLeftRadius, topRightRadius, bottomLeftRadiu s, bottomRightRadi us as
      > integer
      > topLeft = topRight = bottomLeft = bottomRight = true
      > topLeftRadius = topRightRadius = bottomLeftRadiu s = bottomRightRadi us =
      > workRadius
      >
      > (... i think..)
      >
      > __
      > Tor Inge[/color]


      Comment

      • Herfried K. Wagner [MVP]

        #4
        Re: Help for translating from C#

        "Carlo, MCP" <carlodev@gmail .com> schrieb:[color=blue]
        > please, help me to translate these four lines of C# code in VB:
        >
        >
        > bool topLeft, topRight, bottomLeft, bottomRight;[/color]

        \\\
        Dim TopLeft, TopRight, BottomLeft, BottomRight As Boolean
        ///
        [color=blue]
        > int topLeftRadius, topRightRadius, bottomLeftRadiu s, bottomRightRadi us;[/color]

        \\\
        Dim TopLeftRadius, TopRightRadius, BottomLeftRadiu s, BottomRightRadi us As
        Integer
        ///
        [color=blue]
        > topLeft = topRight = bottomLeft = bottomRight = true;[/color]

        \\\
        TopLeft = True
        TopRight = True
        BottomLeft = True
        BottomRight = True
        ///
        [color=blue]
        > topLeftRadius = topRightRadius = bottomLeftRadiu s = bottomRightRadi us =
        > workRadius;[/color]

        \\\
        TopLeftRadius = WorkRadius
        TopRightRadius = WorkRadius
        BottomLeftRadiu s = WorkRadius
        BottomRightRadi us = WorkRadius
        ///

        Converting code between .NET programming languages
        <URL:http://dotnet.mvps.org/dotnet/faqs/?id=languagecon verters&lang=en >

        --
        M S Herfried K. Wagner
        M V P <URL:http://dotnet.mvps.org/>
        V B <URL:http://classicvb.org/petition/>

        Comment

        • Carlo, MCP

          #5
          Re: Help for translating from C#

          Thank you very much!

          c.




          "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> ha scritto nel
          messaggio news:ONgyu9EuFH A.3932@TK2MSFTN GP15.phx.gbl...[color=blue]
          > "Carlo, MCP" <carlodev@gmail .com> schrieb:[color=green]
          >> please, help me to translate these four lines of C# code in VB:
          >>
          >>
          >> bool topLeft, topRight, bottomLeft, bottomRight;[/color]
          >
          > \\\
          > Dim TopLeft, TopRight, BottomLeft, BottomRight As Boolean
          > ///
          >[color=green]
          >> int topLeftRadius, topRightRadius, bottomLeftRadiu s, bottomRightRadi us;[/color]
          >
          > \\\
          > Dim TopLeftRadius, TopRightRadius, BottomLeftRadiu s, BottomRightRadi us As
          > Integer
          > ///
          >[color=green]
          >> topLeft = topRight = bottomLeft = bottomRight = true;[/color]
          >
          > \\\
          > TopLeft = True
          > TopRight = True
          > BottomLeft = True
          > BottomRight = True
          > ///
          >[color=green]
          >> topLeftRadius = topRightRadius = bottomLeftRadiu s = bottomRightRadi us =
          >> workRadius;[/color]
          >
          > \\\
          > TopLeftRadius = WorkRadius
          > TopRightRadius = WorkRadius
          > BottomLeftRadiu s = WorkRadius
          > BottomRightRadi us = WorkRadius
          > ///
          >
          > Converting code between .NET programming languages
          > <URL:http://dotnet.mvps.org/dotnet/faqs/?id=languagecon verters&lang=en >
          >
          > --
          > M S Herfried K. Wagner
          > M V P <URL:http://dotnet.mvps.org/>
          > V B <URL:http://classicvb.org/petition/>[/color]


          Comment

          • Tor Inge Schulstad

            #6
            Re: Help for translating from C#

            Carlo, MCP wrote:[color=blue]
            > Thank you, but 3rd and 4th lines seens to be the same as C#...
            >
            >
            >
            > "Tor Inge Schulstad" <tor.inge.schul stad@gmail.com> ha scritto nel messaggio
            > news:U5-dnSLpl_TjPLve4p 2dnA@telenor.co m...
            >[color=green]
            >>Carlo, MCP wrote:
            >>[color=darkred]
            >>>Hello,
            >>>please, help me to translate these four lines of C# code in VB:
            >>>
            >>>
            >>>bool topLeft, topRight, bottomLeft, bottomRight;
            >>>int topLeftRadius, topRightRadius, bottomLeftRadiu s, bottomRightRadi us;
            >>>topLeft = topRight = bottomLeft = bottomRight = true;
            >>>topLeftRadiu s = topRightRadius = bottomLeftRadiu s = bottomRightRadi us =
            >>>workRadius ;
            >>>
            >>>
            >>>Thank you a lot!
            >>>
            >>>C.
            >>>
            >>>
            >>>[/color]
            >>
            >>Dim topLeft, topRight, bottomLeft, bottomRight as boolean
            >>dim topLeftRadius, topRightRadius, bottomLeftRadiu s, bottomRightRadi us as
            >>integer
            >>topLeft = topRight = bottomLeft = bottomRight = true
            >>topLeftRadi us = topRightRadius = bottomLeftRadiu s = bottomRightRadi us =
            >>workRadius
            >>
            >>(... i think..)
            >>
            >>__
            >>Tor Inge[/color]
            >
            >
            >[/color]
            Sorry, did not test the code before posting...
            This should work:

            Dim topLeft, topRight, bottomLeft, bottomRight As Boolean
            Dim topLeftRadius, topRightRadius, bottomLeftRadiu s, bottomRightRadi us
            As Integer
            topLeft = True
            topRight = True
            bottomLeft = True
            bottomRight = True
            topLeftRadius = workradius
            topRightRadius = workradius
            bottomLeftRadiu s = workradius
            bottomRightRadi us = workradius

            Comment

            • Carlo, MCP

              #7
              Re: Help for translating from C#

              Yes, this works!
              Thank you very much
              c.

              "Tor Inge Schulstad" <tor.inge.schul stad@gmail.com> ha scritto nel messaggio
              news:e46dncyfGf feMLve4p2dnA@te lenor.com...[color=blue]
              > Carlo, MCP wrote:[color=green]
              >> Thank you, but 3rd and 4th lines seens to be the same as C#...
              >>
              >>
              >>
              >> "Tor Inge Schulstad" <tor.inge.schul stad@gmail.com> ha scritto nel
              >> messaggio news:U5-dnSLpl_TjPLve4p 2dnA@telenor.co m...
              >>[color=darkred]
              >>>Carlo, MCP wrote:
              >>>
              >>>>Hello,
              >>>>please, help me to translate these four lines of C# code in VB:
              >>>>
              >>>>
              >>>>bool topLeft, topRight, bottomLeft, bottomRight;
              >>>>int topLeftRadius, topRightRadius, bottomLeftRadiu s, bottomRightRadi us;
              >>>>topLeft = topRight = bottomLeft = bottomRight = true;
              >>>>topLeftRadi us = topRightRadius = bottomLeftRadiu s = bottomRightRadi us =
              >>>>workRadiu s;
              >>>>
              >>>>
              >>>>Thank you a lot!
              >>>>
              >>>>C.
              >>>>
              >>>>
              >>>>
              >>>
              >>>Dim topLeft, topRight, bottomLeft, bottomRight as boolean
              >>>dim topLeftRadius, topRightRadius, bottomLeftRadiu s, bottomRightRadi us as
              >>>integer
              >>>topLeft = topRight = bottomLeft = bottomRight = true
              >>>topLeftRadiu s = topRightRadius = bottomLeftRadiu s = bottomRightRadi us =
              >>>workRadius
              >>>
              >>>(... i think..)
              >>>
              >>>__
              >>>Tor Inge[/color]
              >>
              >>
              >>[/color]
              > Sorry, did not test the code before posting...
              > This should work:
              >
              > Dim topLeft, topRight, bottomLeft, bottomRight As Boolean
              > Dim topLeftRadius, topRightRadius, bottomLeftRadiu s, bottomRightRadi us As
              > Integer
              > topLeft = True
              > topRight = True
              > bottomLeft = True
              > bottomRight = True
              > topLeftRadius = workradius
              > topRightRadius = workradius
              > bottomLeftRadiu s = workradius
              > bottomRightRadi us = workradius[/color]


              Comment

              Working...