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. C# Equivalent code for C++

C# Equivalent code for C++

Scheduled Pinned Locked Moved C#
csharpc++question
5 Posts 4 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.
  • R Offline
    R Offline
    Raheem MA
    wrote on last edited by
    #1

    Hi All, Can you please give me the equivalent code in C# for the following? unsigned char CardType[2]; stu = MF_Request(DeviceAddr, 0, CardType); Message("Request Card", stu); String str; char code[100]; if (stu == 0) { str = " ==> CardType(Hex): "; sprintf(code,"%02X%02X",CardType[0],CardType[1]); str += code; } Thanks in Advance :)shahtech:)

    B G D 3 Replies Last reply
    0
    • R Raheem MA

      Hi All, Can you please give me the equivalent code in C# for the following? unsigned char CardType[2]; stu = MF_Request(DeviceAddr, 0, CardType); Message("Request Card", stu); String str; char code[100]; if (stu == 0) { str = " ==> CardType(Hex): "; sprintf(code,"%02X%02X",CardType[0],CardType[1]); str += code; } Thanks in Advance :)shahtech:)

      B Offline
      B Offline
      blackjack2150
      wrote on last edited by
      #2

      What's the problem? If you have an equivalent for the MF_Request function (which I have no idea what it is), the translation is trivial.

      R 1 Reply Last reply
      0
      • B blackjack2150

        What's the problem? If you have an equivalent for the MF_Request function (which I have no idea what it is), the translation is trivial.

        R Offline
        R Offline
        Raheem MA
        wrote on last edited by
        #3

        Thanks for quick response, Its not a predefined function, just I want to know the equivalent syntax thats it. Thanks

        1 Reply Last reply
        0
        • R Raheem MA

          Hi All, Can you please give me the equivalent code in C# for the following? unsigned char CardType[2]; stu = MF_Request(DeviceAddr, 0, CardType); Message("Request Card", stu); String str; char code[100]; if (stu == 0) { str = " ==> CardType(Hex): "; sprintf(code,"%02X%02X",CardType[0],CardType[1]); str += code; } Thanks in Advance :)shahtech:)

          G Offline
          G Offline
          Guffa
          wrote on last edited by
          #4

          byte[] CardType = new byte[2];

          stu = MF_Request(DeviceAddr, 0, CardType);
          Message("Request Card", stu);

          string str = null;
          if (stu == 0) {
          str = string.Format(" ==> CardType(Hex): {0:x2}{1:x2}", CardType[0], CardType[1]);
          }

          Despite everything, the person most likely to be fooling you next is yourself.

          1 Reply Last reply
          0
          • R Raheem MA

            Hi All, Can you please give me the equivalent code in C# for the following? unsigned char CardType[2]; stu = MF_Request(DeviceAddr, 0, CardType); Message("Request Card", stu); String str; char code[100]; if (stu == 0) { str = " ==> CardType(Hex): "; sprintf(code,"%02X%02X",CardType[0],CardType[1]); str += code; } Thanks in Advance :)shahtech:)

            D Offline
            D Offline
            Dave Doknjas
            wrote on last edited by
            #5

            (via C++ to C# Converter): byte[] CardType = new byte[2]; stu = MF_Request(DeviceAddr, 0, CardType); Message("Request Card", stu); string str; string code = new string(new char[100]); if (stu == 0) { str = " ==> CardType(Hex): "; code = string.Format("{0:X2}{1:X2}", CardType[0], CardType[1]); str += code; }

            David Anton http://www.tangiblesoftwaresolutions.com C++ to C# Converter C++ to VB Converter C++ to Java Converter VB & C# to Java Converter Java to VB & C# Converter Instant C#: VB to C# converter Instant VB: C# to VB converter Instant C++: convert VB, C#, or Java to C++/CLI

            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