Andrei,
To add to what Nick said, you can find an example of the Analog Input task in the following directory on your computer:
C:\Documents and Settings\All Users\Documents\National Instruments\NI-DAQ\Examples\DotNET2.0\Analog In\Measure Voltage\ContAcqVoltageSamples_IntClk\cs
This will show you how to read from the analog input but you do not neccesarily need to read, just setup the task and run it. You will need to use the ConfigureSampleClock method to specify the aisampleclock as the source for your digital input and output tasks.
Please refer to the NI-DAQmx .NET reference in the Start Menu for more help (Start >> Programs >> National Instruments >> NI-DAQ >> NI-DAQmx .NET Framework 2.0 Help)
Let us know if you need anything else!
Abhinav T.
Applications Engineering
National Instruments India
LabVIEW Introduction Course - Six Hours
Getting Started with NI-DAQmx
Measurement Fundamentals