https://bugzilla.novell.com/show_bug.cgi?id=651557

https://bugzilla.novell.com/show_bug.cgi?id=651557#c0


           Summary: Add NSData member to return array of bytes --
                    GetArray()
    Classification: Mono
           Product: MonoTouch
           Version: SVN
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: P5 - None
         Component: Class Libraries
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          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.

Thanks!

 - 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.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to