[Mono-bugs] [Bug 651557] New: Add NSData member to return array of bytes -- GetArray()

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Nov 4 19:54:34 EDT 2010



           Summary: Add NSData member to return array of bytes --
    Classification: Mono
           Product: MonoTouch
           Version: SVN
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: P5 - None
         Component: Class Libraries
        AssignedTo: gnorton at novell.com
        ReportedBy: enagel at nageltech.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)
AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.41 Safari/534.7

This is a convenience function that would make it easy to get the current array
of bytes from an NSData instance and work with it in managed code.

The current approach to this involves geting the pointer to the data and using
Marchal.Copy to extract the data.  Not very user friendly.

Suggested method signature: 

class NSData
    public byte[] GetArray();

This mirrors NSData.FromArray so there's some parity.


 - Ethan

Reproducible: Always

Steps to Reproduce:
new feature request

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list