Initializes a new instance of the Task class with the specified name.

Syntax

Namespace: NationalInstruments.DAQmx

public Task(string name)

Remarks

This constructor creates a new task in the current process. To load a task from Measurement & Automation Explorer (MAX), use the LoadTask(string) method on the Local instance of DaqSystem.

Parameters

NameTypeDescription
namestring

The name of the task to create. If you specify Empty or null, the NI-DAQmx driver assigns a unique name to the new task.

Exceptions

TypeDescription
NationalInstruments.DAQmx.DaqException

The NI-DAQmx driver returned an error.