Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Data type conflict from C++ to C#

Data type conflict from C++ to C#

Scheduled Pinned Locked Moved C#
csharpc++help
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    CodingLover
    wrote on last edited by
    #1

    Hi all, I already convert a C++ project to C# project. It's fine and working ok. On C++ I use DWORD data type. But in C# for that I used just a int value. Is that ok. Is there compatible data type which I can use for my project. Thanks. :)

    I appreciate your help all the time... Eranga :)

    C R 2 Replies Last reply
    0
    • C CodingLover

      Hi all, I already convert a C++ project to C# project. It's fine and working ok. On C++ I use DWORD data type. But in C# for that I used just a int value. Is that ok. Is there compatible data type which I can use for my project. Thanks. :)

      I appreciate your help all the time... Eranga :)

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Are you having an issue, or are you just worried in general ? long is bigger than int in C#.

      Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      C 1 Reply Last reply
      0
      • C Christian Graus

        Are you having an issue, or are you just worried in general ? long is bigger than int in C#.

        Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

        C Offline
        C Offline
        CodingLover
        wrote on last edited by
        #3

        Actually I worried this because it related with registry. So new value type should be compatible with registry data type REG_DWORD :)

        I appreciate your help all the time... Eranga :)

        1 Reply Last reply
        0
        • C CodingLover

          Hi all, I already convert a C++ project to C# project. It's fine and working ok. On C++ I use DWORD data type. But in C# for that I used just a int value. Is that ok. Is there compatible data type which I can use for my project. Thanks. :)

          I appreciate your help all the time... Eranga :)

          R Offline
          R Offline
          Rich Insley
          wrote on last edited by
          #4

          UInt32 or Int32 are equivalent to DWORD in c#.

          C 1 Reply Last reply
          0
          • R Rich Insley

            UInt32 or Int32 are equivalent to DWORD in c#.

            C Offline
            C Offline
            CodingLover
            wrote on last edited by
            #5

            Seems it is fine. Thanks a lot. At the same time I found one thing. bool type variable gives the same output as DWORD. Do you guys know about it?

            I appreciate your help all the time... Eranga :)

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups