MonobjcMonobjc Documented Class Library
ValueWithBytesObjCType Method (value, type)
NamespacesMonobjc.FoundationNSValueValueWithBytesObjCType(IntPtr, String)

Creates and returns an NSValue object that contains a given value, which is interpreted as being of a given Objective-C type.

Original signature is '+ (NSValue *)valueWithBytes:(const void *)value objCType:(const char *)type'

Available in Mac OS X v10.0 and later.

Declaration Syntax
C#Visual BasicVisual C++
public static NSValue ValueWithBytesObjCType(
	IntPtr value,
	string type
)
Public Shared Function ValueWithBytesObjCType ( _
	value As IntPtr, _
	type As String _
) As NSValue
public:
static NSValue^ ValueWithBytesObjCType(
	IntPtr value, 
	String^ type
)
Parameters
value (IntPtr)
The value for the new NSValue object.
type (String)
The Objective-C type of value. type should be created with the Objective-C @encode() compiler directive; it should not be hard-coded as a C string.
Return Value
A new NSValue object that contains value, which is interpreted as being of the Objective-C type type.
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)

Assembly: Monobjc.Foundation (Module: Monobjc.Foundation)