Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.

MakeNETObject

MakeNETObject[expr]
constructs a .NET object that represents the given Mathematica expression.
MakeNETObject[expr, type]
creates an object of the specified type from expr.
  • To use MakeNETObject, you first need to load .NET/Link using Needs["NETLink`"].
  • MakeNETObject accepts numbers, True/False, strings, and lists of these, up to 3-deep.
  • This is a shortcut to calling NETNew, and it is especially useful for arrays, as the array object can be created and initialized with values in a single call.
  • Use the type argument to force a nonstandard type.
  • For example, MakeNETObject[{1, 2, 3}] will create an array of int (type System.Int32[]). If you want an array of Int16, use MakeNETObject[{1, 2, 3}, "System.Int16[]"].
© 2013 Wolfram Research, Inc. Japanese
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team