NETLink`
NETLink`

NETNew

NETNew[type]

constructs a new object of the specified .NET type.

NETNew[type,args]

constructs a new object of the specified .NET type, passing the supplied argument sequence to the constructor.

NETNew[{"type",assembly},args]

constructs the object from the named type in the specified assembly.

NETNew[{"type","assembly","dir"},args]

uses the named assembly from the specified directory, if possible.

NETNew[{"type","assembly","context"},args]

uses the named assembly from the "assembly" subdirectory of the main application directory corresponding to the given context, if possible.

更多信息和选项

  • To use NETNew, you first need to load .NET/Link using Needs["NETLink`"].
  • The type argument can be either a NETType expression that was returned from LoadNETType, or a string giving the type's name. The assembly in which the type resides must have been loaded with LoadNETAssembly.
  • The assembly argument can be an assembly name, a NETAssembly expression returned from LoadNETAssembly, or a path or URL to an assembly file. The assembly will be loaded if necessary.