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. Marshal.Copy

Marshal.Copy

Scheduled Pinned Locked Moved C#
question
4 Posts 2 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.
  • H Offline
    H Offline
    HosamAly
    wrote on last edited by
    #1

    Hello, I noticed today that the System.Runtime.InteropServices.Marshal class has overloads of the Copy method in the form: Copy(IntPtr source, int[] destination, int startIndex, int length);, but there are no overloads for unsigned data (e.g. uint). I wonder why? Thanks in advance.

    O 1 Reply Last reply
    0
    • H HosamAly

      Hello, I noticed today that the System.Runtime.InteropServices.Marshal class has overloads of the Copy method in the form: Copy(IntPtr source, int[] destination, int startIndex, int length);, but there are no overloads for unsigned data (e.g. uint). I wonder why? Thanks in advance.

      O Offline
      O Offline
      oobimoo
      wrote on last edited by
      #2

      Perhaps because uint type is not CLS[^]-compliant.

      H 1 Reply Last reply
      0
      • O oobimoo

        Perhaps because uint type is not CLS[^]-compliant.

        H Offline
        H Offline
        HosamAly
        wrote on last edited by
        #3

        Thanks. But I'm wondering, since I'm creating a class library with methods that take uint, does this mean the library will not be usable except in C#?

        O 1 Reply Last reply
        0
        • H HosamAly

          Thanks. But I'm wondering, since I'm creating a class library with methods that take uint, does this mean the library will not be usable except in C#?

          O Offline
          O Offline
          oobimoo
          wrote on last edited by
          #4

          You dont have problem with existing languages like c++.net or vb.net. But someone may develop a language that uses .net components, without support for unsigned integers. For such senarios stands the CLS.

          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